Newscoop\Service\Model\Search\Search::register PHP Метод

register() публичный Метод

(DO NOT CALL THIS DIRECTLY) Register the column to this search.
public register ( Column $column ) : Column
$column Column The column to register, must not be null or empty.
Результат Column The same column provided, used for chaining purposes.
    public function register(Column $column)
    {
        Validation::notEmpty($column, 'column');
        $this->allColumns[] = $column;
        return $column;
    }

Usage Example

Пример #1
0
 /**
  * Creates a new column.
  *
  * @param Newscoop\Service\Model\Search\Search $search
  *		The search instance that is the owner of this Column.
  */
 function __construct(Search $search)
 {
     Validation::notEmpty($search, 'search');
     $this->search = $search;
     $this->search->register($this);
 }