_moduleTitle) { $this->_moduleTitle = $this->getConfig('itemsName'); } $this->_setMessage('Your ' . $this->_moduleTitle . ' has been updated', static::MSG_UPDATED); $lockMessage = 'Your ' . $this->_moduleTitle . ' is currently being edited by "%firstName% %lastName%" %userRoleTitle%. ' . 'Please try again later.'; $this->_setMessage($lockMessage, static::MSG_LOCKED); return $this; } protected function _initAction() { $this->_setBackUrl($this->_getRedirectUrl()); return parent::_initAction(); } protected function _getLog() { if (null === $this->_log) { parent::_getLog(); $this->_log->setAction('edit', 'Headed to Edit ' . $this->_moduleTitle); $this->_log->setAction('update', $this->_moduleTitle . ' has been updated'); } return $this->_log; } protected function _getRedirectUrl() { /** @var \Qs_Doc $doc */ $doc = Zend_Registry::get('doc'); $this->_getDataObj()->setPrimarykey($doc->getAuthData('id')); $redirectUrl = Qs_SiteMap::findFirst(null, ['type' => 'User\\Member\\'], null, 'url'); if ($redirectUrl) { $userAlias = $this->_getDataObj()->getData('alias'); $redirectUrl .= '/' . $userAlias; } else { /** * якщо немає сторінки з блоком інформації про юзера, то робимо перехід на першу сторінку в юзерського меню */ $redirectUrl = Qs_SiteMap::findFirst(['isAccountNavigation' => 'y'], null, null, 'url'); } if (!$redirectUrl) { $redirectUrl = BASE_URL_LANGUAGE . '/' . PARENT_PAGE; } return $redirectUrl; } protected function _callAction() { $this->_getDataObj()->setPrimarykey($this->_doc->getAuthData('id')); parent::_callAction(); } }