public function testDefaultView()
 {
     $filter = new FilterControl('some_field', FilterOperation::OPERATOR_GTE, new InputOption('fld', [], 5));
     self::assertTrue(!empty($filter->render()));
     $operation = $filter->getOperation();
     self::assertTrue($operation instanceof FilterOperation);
     self::assertTrue($operation->getField() === 'some_field');
     self::assertTrue($operation->getValue() === 5);
     self::assertTrue($operation->getOperator() === FilterOperation::OPERATOR_GTE);
 }
 protected function setViewData()
 {
     parent::setViewData();
     /** @var TemplateView $view */
     $view = $this->getView();
     if ($view instanceof TemplateView) {
         $view->setDataItem('options', $this->selectOptions);
     }
 }
 public function demo10()
 {
     $birthdayFilter = new FilterControl('birthday', FilterOperation::OPERATOR_EQ, new InputOption('birthday', $_GET));
     $birthdayFilter->getView()->setDataItem('inputType', 'date');
     $list = new ManagedList($this->getDataProvider(), [new RecordView(new TemplateView('data_view/table')), $birthdayFilter]);
     $this->layout()->mainSection()->addChild($list);
     BootstrapStyling::applyTo($this->layout());
     return $this->page(null, 'Customizing date input with Bootstrap');
 }