activeUneditableFieldControlGroup() public static method

Generates a control group with a uneditable field for a model attribute.
See also: self::activeControlGroup
public static activeUneditableFieldControlGroup ( 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.
 /**
  * Generates a control group with an uneditable 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::activeUneditableFieldControlGroup
  */
 public function uneditableFieldControlGroup($model, $attribute, $htmlOptions = array())
 {
     $htmlOptions = $this->processRowOptions($model, $attribute, $htmlOptions);
     return TbHtml::activeUneditableFieldControlGroup($model, $attribute, $htmlOptions);
 }
示例#2
0
 public function testActiveUneditableFieldControlGroup()
 {
     $I = $this->codeGuy;
     $html = TbHtml::activeUneditableFieldControlGroup(new Dummy(), 'uneditable');
     $group = $I->createNode($html, 'div.control-group');
     $controls = $group->filter('div.controls');
     $I->seeNodeChildren($controls, array('span.uneditable-input'));
 }
 public function testActiveUneditableFieldControlGroup()
 {
     // @todo BS3 equivalent?
     $I = $this->codeGuy;
     $html = TbHtml::activeUneditableFieldControlGroup(new Dummy(), 'uneditable');
     $group = $I->createNode($html, 'div.form-group');
     $controls = $group->filter('div');
     $I->dontSeeNodeCssClass($controls, 'controls');
     $I->seeNodeChildren($controls, array('span.uneditable-input'));
 }