_getDataObj()->getCategories(); $this->_idCategory = (int) \Qs_Request::getRequestValue('idCategory', key($categories)); $this->_getDataObj()->addFilter(['idCategory' => $this->_idCategory]); return parent::_init(); } protected function _getDefaultLinks() { $links = [ [ 'url' => \Qs_SiteMap::findFirst(null, ['type' => 'Settings\Field\Admin\\'], null, 'url') . '?action=new&idCategory=' . $this->_idCategory, 'title' => 'Add New Field', ], [ 'url' => \Qs_SiteMap::findFirst(null, ['type' => 'Settings\Field\Admin\\'], null, 'url') . '?action=reorder&idCategory=' . $this->_idCategory, 'title' => 'Reorder Fields', ], [ 'url' => \Qs_SiteMap::findFirst(null, ['type' => 'Settings_'], null, 'url') . '?idCategory=' . $this->_idCategory, 'title' => 'Manage Settings', ], ]; return $links; } protected function _addListItem() { $this->_initListRedirection(); $item = $this->_getListItem(); $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(); } }