* @param int|array $id * @param int $platformId * @param int $languageId * @param bool $isArray * @return array|Information|Information[]|null */ function get($id, int $platformId, int $languageId, bool $isArray = false) { if (!$information = $this->findById($id, $platformId, $languageId, $isArray)) { throw new NotFoundException('Information is not found.'); } return $information; } /** * @param int $adminId * @return int */ public function canViewHide(int $adminId): int
*/ public function imagesData($id, int $platformId, int $languages_id) { if (($platformId < 1 || $languages_id < 1) || ((is_array($id) && count($id) < 1) || (int)$id < 1)) { return false; } $information = $this->informationRepository->get($id, $platformId, $languages_id, true); $baseImageUrl = Images::getWSCatalogImagesPath() . $this->imagesLocation(); if (is_array($information)) { $response = []; foreach ($information as $key => $info) { $response[$key] = [ 'title' => $information->page_title,
$platformId = (bool)platform::currentId()?(int)platform::currentId():(int)platform::currentId(); $info_id = (int)Yii::$app->request->get('info_id',0); if(!$info_id){ return ''; } $image = $this->informationRepository->imagesData($info_id,$platformId,$languages_id); if($image === false){ return ''; } $title = $image['title']; $image = $image['imageUrl']; return IncludeTpl::widget(['file' => 'boxes/info/image.tpl', 'params' => [
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
}) }); </script> '; } else { if (is_file(Yii::getAlias('@app') . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'boxes' . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $item['widget_name']) . '.php')){ $widget = $widget_name::widget($widget_array); } elseif (($ext_widget = \common\helpers\Acl::runExtensionWidget($item['widget_name'], $widget_array)) !== false){ $widget = $ext_widget; } elseif (is_file(Yii::getAlias('@app') . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'orders' . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $item['widget_name']) . '.php')) { $manager = []; $widget = $this->params['params']['manager']->render($item['widget_name'], [ 'manager' => $this->params['params']['manager'],
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
$var .= Block::widget(['name' => $block_id, 'params' => ['params' => $this->params]]); $var .= Block::widget(['name' => $block_id . '-2', 'params' => ['params' => $this->params, 'cols' => 2]]); $var .= Block::widget(['name' => $block_id . '-3', 'params' => ['params' => $this->params, 'cols' => 3]]); $var .= Block::widget(['name' => $block_id . '-4', 'params' => ['params' => $this->params, 'cols' => 4]]); $var .= Block::widget(['name' => $block_id . '-5', 'params' => ['params' => $this->params, 'cols' => 5]]); } elseif ($type == 1){ $var .= Block::widget(['name' => $block_id, 'params' => ['params' => $this->params]]); } else { $var .= '<div class="no-block-settings"></div> <script type="text/javascript"> tl(function(){ setTimeout(function(){ if (!window.isOpenedBlockPopup){ window.isOpenedBlockPopup = true;
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
}) }); </script> '; } else { if (is_file(Yii::getAlias('@app') . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'boxes' . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $item['widget_name']) . '.php')){ $widget = $widget_name::widget($widget_array); } elseif (($ext_widget = \common\helpers\Acl::runExtensionWidget($item['widget_name'], $widget_array)) !== false){ $widget = $ext_widget; } elseif (is_file(Yii::getAlias('@app') . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'orders' . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $item['widget_name']) . '.php')) { $manager = []; $widget = $this->params['params']['manager']->render($item['widget_name'], [ 'manager' => $this->params['params']['manager'],
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
),false)) { function content_5ebc0b3b7ef7f1_97216772 (Smarty_Internal_Template $_smarty_tpl) { if ($_smarty_tpl->tpl_vars['page_name']->value == '0_blank') {?> <?php echo frontend\design\Block::widget(array('name'=>'info','params'=>array('type'=>'inform')));?> <?php } else { ?> <?php echo frontend\design\Block::widget(array('name'=>$_smarty_tpl->tpl_vars['page_name']->value,'params'=>array('type'=>'inform')));?> <?php } } }
} if ($_template->startRenderCallbacks) { foreach ($_template->startRenderCallbacks as $callback) { call_user_func($callback, $_template); } } $unifunc($_template); foreach ($_template->endRenderCallbacks as $callback) { call_user_func($callback, $_template); } $_template->isRenderingCache = false; } catch (Exception $e) { $_template->isRenderingCache = false;
$_template->cached->file_dependency = array_merge($_template->cached->file_dependency, $this->file_dependency); } if ($_template->source->handler->uncompiled) { $_template->source->handler->renderUncompiled($_template->source, $_template); } else { $this->getRenderedTemplateCode($_template); } if ($_template->caching && $this->has_nocache_code) { $_template->cached->hashes[ $this->nocache_hash ] = true; } if ($_template->smarty->debugging) { $_template->smarty->_debug->end_render($_template);
} $this->cached->render($this, $no_output_filter); } else { if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) { $this->loadCompiled(true); } $this->compiled->render($this); } // display or fetch if ($display) { if ($this->caching && $this->smarty->cache_modified_check) { $this->smarty->ext->_cacheModify->cacheModifiedCheck( $this->cached,
} ob_start(); $template->_mergeVars(); if (!empty(Smarty::$global_tpl_vars)) { $template->tpl_vars = array_merge(Smarty::$global_tpl_vars, $template->tpl_vars); } $result = $template->render(false, $function); $template->_cleanUp(); if ($saveVars) { $template->tpl_vars = $savedTplVars; $template->config_vars = $savedConfigVars; } else { if (!$function && !isset(Smarty_Internal_Template::$tplObjCache[ $template->templateId ])) {
* @throws Exception * @throws SmartyException * @return string rendered template output */ public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null) { $result = $this->_execute($template, $cache_id, $compile_id, $parent, 0); return $result === null ? ob_get_clean() : $result; } /** * displays a Smarty template *
$template->assign('app', \Yii::$app); $template->assign('this', $view); $template->assign('js_mask_type', 'accounting');// accounting or maskMoney $template->assign('js_hide_currency', 1);// 0 1 return $template->fetch(); } /** * Resolves Yii alias into file path * * @param string $type
if (isset($this->renderers[$ext])) { if (is_array($this->renderers[$ext]) || is_string($this->renderers[$ext])) { $this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($viewFile, $params, $output); }
* @throws InvalidCallException if the view cannot be resolved. * @see renderFile() */ public function render($view, $params = [], $context = null) { $viewFile = $this->findViewFile($view, $context); return $this->renderFile($viewFile, $params, $context); } /** * Finds the view file based on the given view name. * @param string $view the view name or the [path alias](guide:concept-aliases) of the view file. Please refer to [[render()]] * on how to specify this parameter.
$this->getView()->clear(); } $this->view->page_params = $params['params']; //$headers = Yii::$app->response->headers; //$headers->set('X-Frame-Options', 'SAMEORIGIN'); $content = $this->getView()->render($view, $params, $this); $renderContent = \common\helpers\Translation::frontendTranslation($this->renderContent($content)); return $renderContent; } public function getHerfLang($platforms_languages){
\frontend\design\Info::addBlockToPageName($page_name); return $this->render('index.tpl', [ 'description' => $row['description'], 'title' => $title, 'page' => 'info', 'page_name' => $page_name ]); } public function actions() { global $HTT_GET_VARS; $action = $_GET['action'];
$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 */
if ($ext::allowed() ) { $ext::registerJsFile($this->getView()); } } } return parent::runAction($id, $params); } protected function setMeta($id, $params) {
$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-local.php'), require(__DIR__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php') ); $application = new yii\web\Application($config); $application->run();
header('Location: ' . $uri); exit(); } require('includes/application_top.php'); require(__DIR__ . '/lib/frontend/web/index.php'); require_once('includes/application_bottom.php');
$_GET = [ 'info_id' => '51', ]; $_SESSION = [ '__flash' => [], '_tlStorageId' => 'fZDabsCtXplCMMnfokNjEpoRYLlRY10S', 'platform_sattelite' => 0, 'platform_code' => '', 'fZDabsCtXplCMMnfokNjEpoRYLlRY10S' => [ 'customer_groups_id' => '25', ], 'language' => 'dutch', 'primary-settings' => [ 'locale' => 'nl_NL', 'languages_id' => '3', 'currency_id' => '2', 'currency' => 'EUR', ], 'SHOW_OUT_OF_STOCK' => 1, 'gl' => 'grid', 'bpObserver' => unserialize('O:48:"common\\models\\promotions\\PromotionsBonusObserver":2:{s:11:"workingDate";s:10:"29-03-2024";s:7:"actions";a:0:{}}'), ];