Example #1
0
 /**
  * @return mixed|string
  */
 public function getFilter()
 {
     $value = array_get($this->table->getInput(), $this->name);
     // if the value coming back from array_get is an array, it means name is not set. we don't want an array.
     if (is_array($value)) {
         $value = '';
     }
     if (isset($this->filter) && is_array($this->filter)) {
         return sprintf('<select name="%s" class="form-control">%s</select>', $this->name, $this->buildDropDownList($this->filter, $value));
     }
     if (!isset($this->filter)) {
         return sprintf('<div class="grid-view-filter-container">
             <input type="text" name="%s" style="width:100%%" class="grid-view-filter input-small form-control" value="%s">
             </div>', $this->name, e($value));
     }
     return $this->filter;
 }