getSearchValue() public static method

Returns search form default value
public static getSearchValue ( string $name ) : mixed
$name string
return mixed
示例#1
0
 /**
  * Returns HTML with select options for searchable column
  *
  * @return string
  */
 private function _optionsHTML()
 {
     $result = '';
     foreach ($this->options() as $key => $label) {
         $selected = ResourceTable::getSearchValue($this->index()) == $key ? ' selected="selected"' : '';
         $result .= '<option value="' . $key . '"' . $selected . '>' . $label . '</option>';
     }
     return $result;
 }