_getDataObj()->getCategories(); $this->_idCategory = (int)\Qs_Request::getRequestValue('idCategory', key($categories)); $this->_getDataObj()->addFilter(array('idCategory' => $this->_idCategory)); return parent::_init(); } protected function _getDefaultLinks() { $links = array( array( 'url' => \Qs_SiteMap::findFirst(null, array('type' => 'Settings\Field\Admin\\'), null, 'url') . '?action=new&idCategory=' . $this->_idCategory, 'title' => 'Add New Field' ), array( 'url' => \Qs_SiteMap::findFirst(null, array('type' => 'Settings\Field\Admin\\'), null, 'url') . '?action=reorder&idCategory=' . $this->_idCategory, 'title' => 'Reorder Fields' ), array( 'url' => \Qs_SiteMap::findFirst(null, array('type' => 'Settings_'), null, 'url') . '?idCategory=' . $this->_idCategory, 'title' => 'Manage Settings' ), ); return $links; } protected function _addListItem($list = null) { $item = $this->_getListItem($list); $item['columns']['options']['actions']['edit']['link'] .= '&idCategory=' . $this->_idCategory; $item['columns']['options']['actions']['delete']['link'] .= '&idCategory=' . $this->_idCategory; $this->_addLinksItem(); $this->_addItem($item); return $this; } protected function _doChangeOption() { if (null === $this->_getDataObj()->getData()) { $this->_setBackError(static::MSG_DATA_UNAVAILABLE); $this->_doBack(); } if ($this->_isLocked()) { $this->_setBackAttention($this->_createMessage(static::MSG_LOCKED, $this->_getLocker())); } else { if ($this->_getDataObj()->changeEnumOption(\Qs_Request::getRequestValue('column'))) { $this->_postChangeOption(); } else { $this->_setBackErrors($this->_getDataObj()->getErrors()); } } $this->_doBack(); } protected function _postDelete() { $this->_getDataObj()->deleteSettingOptions(); return parent::_postDelete(); } }