/** * doExecute * * @return mixed */ protected function doExecute() { $model['list.search'] = $this->getUserStateFromInput($this->getContext('list.search'), 'search', array(), InputFilter::ARRAY_TYPE); $model['list.filter'] = $this->getUserStateFromInput($this->getContext('list.filter'), 'filter', array(), InputFilter::ARRAY_TYPE); $model['list.ordering'] = $this->getUserStateFromInput($this->getContext('list.ordering'), 'list_ordering'); $model['list.direction'] = $this->getUserStateFromInput($this->getContext('list.direction'), 'list_direction'); $uri = new Uri($this->app->uri->full); $uri->delVar('filter'); $this->setRedirect($uri->toString()); return true; }
/** * Test the delVar method. * * @return void * * @since 1.0 * @covers Windwalker\Uri\Uri::delVar */ public function testDelVar() { $this->assertThat($this->object->getVar('var'), $this->equalTo('value')); $this->object->delVar('var'); $this->assertThat($this->object->getVar('var'), $this->equalTo('')); }