Beispiel #1
0
 /**
  * Prepares component for rendering.
  */
 protected function prepare()
 {
     parent::prepare();
     $this->hideControlRowIfEmpty();
 }
 /**
  * Custom styling
  *
  * @return string
  */
 public function demo4_4()
 {
     $provider = $this->getDataProvider();
     $input = new InputSource($_GET);
     $list = new ManagedList($provider, [new RecordView(new SymfonyVarDump()), new FilterControl('name', FilterOperation::OPERATOR_EQ, $input('name_filter')), new FilterControl('role', FilterOperation::OPERATOR_EQ, $input('role_filter')), new SortingSelectControl([null => 'None', 'id' => 'ID', 'name' => 'Name', 'role' => 'Role', 'birthday' => 'Birthday'], $input('sort_field'), $input('sort_dir')), new PaginationControl($input('page', 1), 5), new PageSizeSelectControl($input('page_size', 5), [2, 5, 10]), new ManagedList\ResetButton()]);
     $list->attachTo($this->layout());
     BootstrapStyling::applyTo($list);
     return $this->page($list, 'Filtering controls in managed list + styling + pagination + InputSource');
 }