activeUneditableField() public static method

Generates an uneditable input for a model attribute.
public static activeUneditableField ( 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 input.
Exemplo n.º 1
0
 public function testActiveUneditableField()
 {
     $I = $this->codeGuy;
     $html = TbHtml::activeUneditableField(new Dummy(), 'uneditable', array('class' => 'span'));
     $span = $I->createNode($html, 'span.uneditable-input');
     $I->seeNodeCssClass($span, 'span');
     $I->seeNodeText($span, 'Uneditable text');
 }
Exemplo n.º 2
0
 /**
  * Renders an uneditable field for a model attribute.
  * @param CModel $model the data model.
  * @param string $attribute the attribute.
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated field.
  * @see TbHtml::activeUneditableField
  */
 public function uneditableField($model, $attribute, $htmlOptions = array())
 {
     return TbHtml::activeUneditableField($model, $attribute, $htmlOptions);
 }