if (catalog\Card::isDetailHidden($this->sectionId())) { throw new NotFoundHttpException(); } $this->oModule->setStatePage(Zones\Api::DETAIL_LAYOUT); $sBaseCardName = catalog\Card::DEF_BASE_CARD; $this->aGood = catalog\GoodsSelector::get($this->sGoodsAlias ? $this->sGoodsAlias : $this->iGoodsId, $sBaseCardName, false, $this->sectionId()); \Yii::$app->router->setLastModifiedDate($this->aGood['last_modified_date']); // Не отдавать модификацию товара, если выключен показ модификаций if (!SysVar::get('catalog.goods_modifications') and ($this->aGood['id'] != $this->aGood['main_obj_id'])) { $this->aGood = null; } if (empty($this->aGood)) { throw new NotFoundHttpException('Не найдена товарная позиция'); }
$this->oModule->setStatePage(Zones\Api::DETAIL_LAYOUT); $sBaseCardName = catalog\Card::DEF_BASE_CARD; $this->aGood = catalog\GoodsSelector::get($this->sGoodsAlias ? $this->sGoodsAlias : $this->iGoodsId, $sBaseCardName, false, $this->sectionId()); \Yii::$app->router->setLastModifiedDate($this->aGood['last_modified_date']); // Не отдавать модификацию товара, если выключен показ модификаций if (!SysVar::get('catalog.goods_modifications') and ($this->aGood['id'] != $this->aGood['main_obj_id'])) { $this->aGood = null; }
abstract public function init(); abstract public function build(); final public function show() { $this->init(); $this->build(); } protected function getSection() { return $this->getModule()->sectionId();
$oFilterModule = $this->getProcess('out.CatalogFilter', psAll); if ($oFilterModule instanceof site_module\Process) { $oFilterModule->setStatus(psBreak); } } $this->oState->show(); return psComplete; } /** Осуществление ajax-голосования */ protected function cmdAddRating()
$this->oContext->getModuleLayer() ) ); } $this->oObject->init(); $this->iStatus = $this->oObject->execute(); $this->iStatus = ($this->iStatus) ? $this->iStatus : psError; $this->oObject->shutdown(); } catch (NotFoundHttpException $e) { \Yii::$app->router->setPage(page404); return psExit;
case psNew: case psWait: $sClassName = $oProcess->getModuleClass(); \Yii::beginProfile($sClassName, 'sk\Module'); $iStatus = $oProcess->execute(); \Yii::endProfile($sClassName, 'sk\Module'); switch ($iStatus) { case psComplete:
* Выполнить коневой процесс * * @return bool|int */ private function executeRootProcess() { $iStatus = \Yii::$app->processList->executeProcessList(); if ($this->check404()) { if (\Yii::$app->router->sectionId == \Yii::$app->sections->main()) { $sAction404 = Site::actionOnError404(); // Устанавливаем 404 страницу и отдаем 404й код
} \Yii::$app->processList->removeProcess('out'); $oPage = $this->initRootProcess(); $iStatus = $this->executeRootProcess(); if (++$iCnt > 10) { throw new ServerErrorHttpException('Infinite loop in page id determination' . \Yii::$app->processList->getCurrentStateText()); } } while ($iStatus == psExit);
$args = $this->controller->bindActionParams($this, $params); Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); if ($oldController !== null) { Yii::$app->controller = $oldController; } return $result; }
$params = $this->catchAll; unset($params[0]); } try { Yii::debug("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } $response = $this->getResponse(); if ($result !== null) {
$this->skRequestInit(); $this->setUserIpForDebug(); $this->initMailer(); return parent::handleRequest($request); } /** * @return i18n\SectionsPrototype $sections component to a service section */ public function getSections()
{ try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
require_once RELEASEPATH . '/../vendor/autoload.php'; require_once RELEASEPATH . '/../skewer/app/Application.php'; $config = require RELEASEPATH . '/config/web.php'; $app = (new \skewer\app\Application($config))->run(); exit;
$_GET = [ 'url' => 'projects/voennye-gorodki/khranenie-pererabotka-i-transportirovanie-radioaktivnykh-otkhodov', ]; $_SESSION = [ '__flash' => [], 'auth' => [ 'public' => [ 'userData' => [ 'id' => '2', 'global_id' => '0', 'login' => 'default', 'pass' => '3c457370f09985aa39a01b9502434916', 'group_policy_id' => '2', 'active' => '1', 'reg_date' => '0000-00-00 00:00:00', 'lastlogin' => '0000-00-00 00:00:00', 'name' => 'Публичный пользователь', 'email' => '', 'postcode' => '', 'address' => '', 'phone' => '', 'user_info' => '', 'network' => null, 'systemMode' => false, 'policyAlias' => 'default', 'access_level' => 2, ], 'policy_version' => 812, 'start_section' => 78, 'read_access' => [ '3', '243', '244', '247', '248', '296', '69', '78', '251', '233', '234', '294', '302', '303', '304', '305', '328', '306', '322', '321', '314', '335', '336', '337', '338', '339', '315', '326', '316', '317', '319', '330', '329', '331', '332', '333', '318', '70', '120', '137', '116', '175', '274', '295', '297', '298', ], 'actions_access' => [ 'skewer\\build\\Page\\Main\\Module' => [ 'allowPageRead' => [ 'value' => '0', ], 'allowPageWrite' => [ 'value' => '0', ], ], 'skewer\\build\\Page\\News\\Module' => [ 'allowNewsDetailRead' => [ 'value' => '0', ], 'allowNewsListRead' => [ 'value' => '0', ], ], ], 'modules_access' => [], 'read_disable' => [ '2', 7, 8, 177, 241, 253, 254, 288, 293, 323, '111', ], ], 'userIP' => '3.89.116.152', 'hostName' => 'www.oboronpromecologiya.ru', ], ];