public function __construct(Builder $builder, array $options = null) { parent::__construct($options); $this->set('list', true); $this->input->class('button'); $this->wrapper->class('format is-responsive'); }
public function __construct(Builder $builder, EntityInterface $related, SearchQuery $search = null) { parent::__construct(); $this->input[''] = ''; foreach ($related->search($search ?: new SearchQuery()) as $id => $row) { $this->input[$id] = $related->getLabel($id, $row); } $this->set('list', false); $this->wrapper->class('format is-responsive'); $this->data(['module' => 'format-select', 'related' => $related->getName()]); }