NORMAL() публичный статический Метод

Will construct a new searchable that will allow normal searching but not regex searching.
public static NORMAL ( ) : OpenSkill\Datatable\Columns\Searchable\DefaultSearchable
Результат OpenSkill\Datatable\Columns\Searchable\DefaultSearchable
 public function testDefaultOrderMultiWithSearch()
 {
     $this->orderAndSearchMultiTest(true, Searchable::NORMAL());
 }
Пример #2
0
 /**
  * Will create a new ColumnConfiguration with all defaults but allows overriding of all properties through the method.
  *
  * @param string $name The name of the configuration, required for the configuration
  * @param string|callable $callable The function to execute, defaults to null which means the default will be set.
  * @param Searchable $searchable If the column should be searchable or not
  * @param Orderable $orderable If the column should be orderable or not
  * @return $this
  */
 public function column($name, $callable = null, Searchable $searchable = null, Orderable $orderable = null)
 {
     /**
      * @var ColumnConfigurationBuilder
      */
     $config = ColumnConfigurationBuilder::create();
     if (is_string($name)) {
         $config->name($name);
     } else {
         throw new \InvalidArgumentException('$name must be a string');
     }
     if (!is_null($callable)) {
         if (is_callable($callable)) {
             $config->withCallable($callable);
         } elseif (is_string($callable)) {
             $config->withCallable(function () use($callable) {
                 return $callable;
             });
         }
     }
     if (is_null($searchable)) {
         $config->searchable(Searchable::NORMAL());
     }
     if (is_null($orderable)) {
         $config->orderable(Orderable::BOTH());
     }
     $this->columnConfiguration[] = $config->build();
     return $this;
 }
 /**
  * Will check if the searchable flag is correctly set, if not it will be set to the default NONE
  */
 private function checkSearchable()
 {
     if ($this->searchable == null) {
         $this->searchable = Searchable::NORMAL();
     }
 }
 public function testClass()
 {
     $t = Searchable::NORMAL();
     $this->assertTrue($t->isSearchable());
 }