TbHtml::activeNumberFieldControlGroup PHP Method

activeNumberFieldControlGroup() public static method

Generates a control group with a number field for a model attribute.
See also: self::activeControlGroup
public static activeNumberFieldControlGroup ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model.
$attribute string the attribute.
$htmlOptions array additional HTML attributes.
return string the generated control group.
    public static function activeNumberFieldControlGroup($model, $attribute, $htmlOptions = array())
    {
        return self::activeControlGroup(self::INPUT_TYPE_NUMBER, $model, $attribute, $htmlOptions);
    }

Usage Example

Example #1
0
 public function testActiveNumberFieldControlGroup()
 {
     $I = $this->codeGuy;
     $html = TbHtml::activeNumberFieldControlGroup(new Dummy(), 'number');
     $group = $I->createNode($html, 'div.control-group');
     $label = $group->filter('label.control-label');
     $I->seeNodeChildren($label, array('input[type=number]'));
 }
All Usage Examples Of TbHtml::activeNumberFieldControlGroup
TbHtml