_getFormOptions()); $form->setMethod('get'); return $form; } public function exec() { $form = $this->getForm(); if ($form->isSubmitted()) { if ($form->validate()) { $this->_lookup($form->getValue('module')); return $this; } } $this->_addFormItem($form); return $this; } protected function _lookup($module) { $pages = \Qs_SiteMap::find(null, array('type' => $module)); if (empty($pages)) { $this->_addFormItem($this->getForm()); $this->_doc->displayMessage('Not found pages with module "' . $module . '"'); return $this; } $item = array( 'query' => $module, 'pages' => $pages, 'tpl' => $this->getTemplate('lookup-results.tpl'), ); $this->_addFormItem($this->getForm()); $this->_addItem($item); return $this; } }