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.
Exemplo n.º 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]'));
 }
Exemplo n.º 2
0
 /**
  * Generates a control group with a number field for a model attribute.
  * @param CModel $model the data model.
  * @param string $attribute the attribute name.
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated row.
  * @see TbHtml::activeNumberFieldControlGroup
  */
 public function numberFieldControlGroup($model, $attribute, $htmlOptions = array())
 {
     $htmlOptions = $this->processRowOptions($model, $attribute, $htmlOptions);
     return TbHtml::activeNumberFieldControlGroup($model, $attribute, $htmlOptions);
 }