SELECT 1 FROM {{%crd-link__brand__geo-region}} WHERE EXISTS ( SELECT DISTINCT(brand_id) FROM {{%crd-link__brand__geo-region}} WHERE brand_id NOT IN ( SELECT DISTINCT(brand_id) FROM {{%crd-link__brand__geo-region}} WHERE region_id=' . $this->activeRegion->model->region_id . ' ) ) OR EXISTS ( SELECT DISTINCT(goods_id) FROM {{%crd-link__goods__geo-region}} WHERE goods_id NOT IN ( SELECT DISTINCT(goods_id)
SELECT DISTINCT(brand_id) FROM {{%crd-link__brand__geo-region}} WHERE brand_id NOT IN ( SELECT DISTINCT(brand_id) FROM {{%crd-link__brand__geo-region}} WHERE region_id=' . $this->activeRegion->model->region_id . ' ) ) OR EXISTS ( SELECT DISTINCT(goods_id) FROM {{%crd-link__goods__geo-region}}
* @see __set() */ public function __get($name) { $getter = 'get' . $name; if (method_exists($this, $getter)) { return $this->$getter(); } elseif (method_exists($this, 'set' . $name)) { throw new InvalidCallException('Getting write-only property: ' . get_class($this) . '::' . $name); } throw new UnknownPropertyException('Getting unknown property: ' . get_class($this) . '::' . $name); }
// по следующему алгоритму: // если запрещенные бренды или продукты для текущей // товарной категории есть: то добавляем новый фильтр // и учитываем тех. фильтрацию (если не было: просто по общей границе) // оптимизация - перед отсеканием запрещенных объектов // можно убедиться, что они есть if ($this->distributorManager->isExistsForbiddenObjects !== false) { $this->regionalDistributionByTechnicalBounder(); // если на этапе региональной дистрибьюции // не нашлось карточек, можно останавливать процесс if ($this->productSet->storage->countRegularTechnicalPidsStorage === 0) { return false; }
/** * TODO[emptyPhpDoc] * @return void */ public function applyFullFilter(): void { $status = $this->prepareAllManual(); $this->isEmptyResult = !$status; return; } /** * TODO[emptyPhpDoc]
] ) ] ); } // and apply all filters $this->appFilterDao->applyFullFilter(); } private function initWidgetData(): void { // TODO[] сделать в учет в одном месте // (создание и конфига всего рендеринга)
$this->initWidgetData(); } private function initOther(): void { $this->initWidgetData(); $this->initCatalogData(); } private function fillRenderDataCategoryLinker(): void { /** @var WidgetCollector2WidgetPlaceRendererV1ConfigGenerator $configGenerator */ $configGenerator = $this->di->get(
case SectionTypeEnum::categoryIndex: case SectionTypeEnum::categoryBrand: case SectionTypeEnum::categoryProductLine: case SectionTypeEnum::stock: case SectionTypeEnum::commonTag: case SectionTypeEnum::categoryTag: $this->initOther(); break; } $this->setSeoDepends(); $this->prepareSeo();
*/ public function __construct($config = []) { if (!empty($config)) { Yii::configure($this, $config); } $this->init(); } /** * Initializes the object. * This method is invoked at the end of the constructor after the object is initialized with the * given configuration.
$config = $this->resolveDependencies($config); if (!empty($dependencies) && $reflection->implementsInterface('yii\base\Configurable')) { // set $config as the last parameter (existing one will be overwritten) $dependencies[count($dependencies) - 1] = $config; return $reflection->newInstanceArgs($dependencies); } $object = $reflection->newInstanceArgs($dependencies); foreach ($config as $name => $value) { $object->$name = $value; }
$class = $class->id; } if (isset($this->_singletons[$class])) { // singleton return $this->_singletons[$class]; } elseif (!isset($this->_definitions[$class])) { return $this->build($class, $params, $config); } $definition = $this->_definitions[$class]; if (is_callable($definition, true)) { $params = $this->resolveDependencies($this->mergeParams($class, $params));
$config = array_merge($definition, $config); $params = $this->mergeParams($class, $params); if ($concrete === $class) { $object = $this->build($class, $params, $config); } else { $object = $this->get($concrete, $params, $config); } } elseif (is_object($definition)) { return $this->_singletons[$class] = $definition; } else { throw new InvalidConfigException('Unexpected object definition type: ' . gettype($definition)); }
/** * @return mixed */ public function actionIndex(string $slug) { /** @var SectionViewActivePage $this->activePage */ $this->activePage = Yii::$container->get( class: 'sectionViewActivePage', config: [ 'model' => $this->findSection($slug), 'activeRegion' => Yii::$container->get('activeRegion'), 'request' => Yii::$app->request, ]
$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) {
{ 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 __DIR__ . '/../../common/config/main.php', require __DIR__ . '/../../common/config/main-local.php', require __DIR__ . '/../config/main.php', require __DIR__ . '/../config/main-local.php' ); (new yii\web\Application($config))->run();
$_GET = [ 'slug' => 'postelnoe_belye', ]; $_SESSION = [ '__flash' => [], ];