activeSearchQueryControlGroup() public static method

Generates a control group with a search field for a model attribute.
See also: self::activeControlGroup
public static activeSearchQueryControlGroup ( 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 a search 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::activeSearchFieldControlGroup
  */
 public function searchQueryControlGroup($model, $attribute, $htmlOptions = array())
 {
     $htmlOptions = $this->processRowOptions($model, $attribute, $htmlOptions);
     return TbHtml::activeSearchQueryControlGroup($model, $attribute, $htmlOptions);
 }
Esempio n. 2
0
 public function testActiveSearchQueryControlGroup()
 {
     $I = $this->codeGuy;
     $html = TbHtml::activeSearchQueryControlGroup(new Dummy(), 'search');
     $group = $I->createNode($html, 'div.control-group');
     $controls = $group->filter('div.controls');
     $I->seeNodeChildren($controls, array('input[type=text].search-query'));
 }
 public function testActiveSearchQueryControlGroup()
 {
     $I = $this->codeGuy;
     $html = TbHtml::activeSearchQueryControlGroup(new Dummy(), 'search');
     $group = $I->createNode($html, 'div.form-group');
     $controls = $group->filter('div');
     $I->dontSeeNodeCssClass($controls, 'controls');
     $I->seeNodeChildren($controls, array('input[type=search]'));
 }