Image::$thumbnailBackgroundAlpha = 0; $image = Image::thumbnail( $src, $this->width, $this->height, ManipulatorInterface::THUMBNAIL_INSET ); if (!is_dir($fileStore)) { if (!mkdir($fileStore)) { Yii::warning('Cannot create folder for images', self::className()); return 'Failed'; } } if(false === $image->save($fileStore . '/' . $pathName . '.' . $ext, ['quality' => $this->quality])){ Yii::warning('Cannot save generated image', self::className()); } } }
$this->width, $this->height, ManipulatorInterface::THUMBNAIL_INSET ); if (!is_dir($fileStore)) { if (!mkdir($fileStore)) { Yii::warning('Cannot create folder for images', self::className()); return 'Failed'; } } if(false === $image->save($fileStore . '/' . $pathName . '.' . $ext, ['quality' => $this->quality])){ Yii::warning('Cannot save generated image', self::className());
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();
$img = app\modules\image\widgets\ImageOptimizeWidget::widget([ 'src' => $images ? '/files/'. $images[0]->filename : null, 'emptyImage' => '/theme/2019/distr/img/img_theme/doc-alternate-001.png', 'width' => 265, 'height' => 265, // 'asContent' => true, 'alt' => $product->name ]) ?> <?= $img ?> </a> </div>
{ $_obInitialLevel_ = ob_get_level(); ob_start(); ob_implicit_flush(false); extract($_params_, EXTR_OVERWRITE); try { require $_file_; return ob_get_clean(); } catch (\Exception $e) { while (ob_get_level() > $_obInitialLevel_) { if (!@ob_end_clean()) { ob_clean(); }
$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); } array_pop($this->_viewFiles); $this->context = $oldContext;
* @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.
<div class="list-doctors"> <?php foreach ($agregators as $agregator): ?> <?php /* vdr($agregator->getClinics()); */ ?> <?= $this->render('doctor-row', [ 'agregator' => $agregator, 'category' => $category, 'allClinics' => $allClinics, ]) ?> <?php endforeach; ?> </div> <?php if($agregator->hasClinics()):?> <div class="map-container">
{ $_obInitialLevel_ = ob_get_level(); ob_start(); ob_implicit_flush(false); extract($_params_, EXTR_OVERWRITE); try { require $_file_; return ob_get_clean(); } catch (\Exception $e) { while (ob_get_level() > $_obInitialLevel_) { if (!@ob_end_clean()) { ob_clean(); }
$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); } array_pop($this->_viewFiles); $this->context = $oldContext;
* @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.
* These parameters will not be available in the layout. * @return string the rendering result. * @throws InvalidArgumentException if the view file or the layout file does not exist. */ public function render($view, $params = []) { $content = $this->getView()->render($view, $params, $this); return $this->renderContent($content); } /** * Renders a static string by applying a layout. * @param string $content the static string being rendered
'category' => $category, 'district' => $district, 'filters' => $service->getPageFilters(), 'allClinics' => $service2->getAllMapPoints(), 'mapData' => $mapData, 'title_h1' => $title_h1, 'content_top' => $content_top ]); } /** * @param null Category $category * @param null MedclinicGeoDistrict $district
if(is_object($product)){ return $this->show($product); }else if($isAjax){ return $this->ajaxList($category, $district); }else{ return $this->list($category, $district); } } public function actionApplyFilter($name, $value){ Yii::$app->getResponse()->format = \yii\web\Response::FORMAT_JSON;
$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();
defined('YII_ENV') or define('YII_ENV', $yiiEnvironment); defined('YII_CONSOLE') or define('YII_CONSOLE', false); require(__DIR__ . '/../vendor/autoload.php'); require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); $config = require(__DIR__ . '/../config/web.php'); require(__DIR__ . '/../functions.php'); (new yii\web\Application($config))->run();
$_GET = [ 'last_category_id' => null, 'category_group_id' => 1, 'parent_id' => 1, 'category' => unserialize('O:32:"app\\modules\\shop\\models\\Category":14:{s:10:"deleteMode";i:1;s:41:"' . "\0" . 'app\\modules\\shop\\models\\Category' . "\0" . 'urlPath";N;s:43:"' . "\0" . 'app\\modules\\shop\\models\\Category' . "\0" . 'parentIds";N;s:44:"' . "\0" . 'app\\modules\\shop\\models\\Category' . "\0" . 'filterSets";N;s:36:"' . "\0" . 'yii\\db\\BaseActiveRecord' . "\0" . '_attributes";a:21:{s:2:"id";i:19;s:17:"category_group_id";i:1;s:9:"parent_id";i:1;s:4:"name";s:14:"Онколог";s:5:"title";s:14:"Онколог";s:2:"h1";s:14:"Онколог";s:16:"meta_description";s:364:"Запись к онкологу в Казани удобнее делать через сервис ОК\'ДОКТОР. Можно это сделать в самое удобное время. Рейтинг врачей формируется по отзывам. Лучший способ узнать цену у всех специалистов Казани.";s:17:"breadcrumbs_label";s:14:"Онколог";s:4:"slug";s:7:"onkolog";s:13:"slug_compiled";s:0:"";s:13:"slug_absolute";i:0;s:7:"content";s:433:"<p>Сервис<img src="/upload/images/58eb3adf2b624.png" height="15" alt="онколог" style="height: 15px;"> - это удобный способ быстро записаться на прием к платному онкологу в Казани. Записываться на прием к специалистам вместе с ОК\'Доктор - это действительно удобно! </p> <p><br><br> </p>";s:8:"announce";s:0:"";s:10:"sort_order";i:1690;s:12:"title_append";s:91:"- записаться на прием к платному онкологу в Казани";s:6:"active";i:1;s:10:"date_added";s:19:"2016-08-12 10:42:22";s:13:"date_modified";s:19:"2017-06-28 15:50:58";s:11:"property_id";i:0;s:17:"property_group_id";i:0;s:3:"fts";s:23:"\'1\' \'онколог\':1A";}s:39:"' . "\0" . 'yii\\db\\BaseActiveRecord' . "\0" . '_oldAttributes";a:21:{s:2:"id";i:19;s:17:"category_group_id";i:1;s:9:"parent_id";i:1;s:4:"name";s:14:"Онколог";s:5:"title";s:14:"Онколог";s:2:"h1";s:14:"Онколог";s:16:"meta_description";s:364:"Запись к онкологу в Казани удобнее делать через сервис ОК\'ДОКТОР. Можно это сделать в самое удобное время. Рейтинг врачей формируется по отзывам. Лучший способ узнать цену у всех специалистов Казани.";s:17:"breadcrumbs_label";s:14:"Онколог";s:4:"slug";s:7:"onkolog";s:13:"slug_compiled";s:0:"";s:13:"slug_absolute";i:0;s:7:"content";s:433:"<p>Сервис<img src="/upload/images/58eb3adf2b624.png" height="15" alt="онколог" style="height: 15px;"> - это удобный способ быстро записаться на прием к платному онкологу в Казани. Записываться на прием к специалистам вместе с ОК\'Доктор - это действительно удобно! </p> <p><br><br> </p>";s:8:"announce";s:0:"";s:10:"sort_order";i:1690;s:12:"title_append";s:91:"- записаться на прием к платному онкологу в Казани";s:6:"active";i:1;s:10:"date_added";s:19:"2016-08-12 10:42:22";s:13:"date_modified";s:19:"2017-06-28 15:50:58";s:11:"property_id";i:0;s:17:"property_group_id";i:0;s:3:"fts";s:23:"\'1\' \'онколог\':1A";}s:33:"' . "\0" . 'yii\\db\\BaseActiveRecord' . "\0" . '_related";a:0:{}s:47:"' . "\0" . 'yii\\db\\BaseActiveRecord' . "\0" . '_relationsDependencies";a:0:{}s:23:"' . "\0" . 'yii\\base\\Model' . "\0" . '_errors";N;s:27:"' . "\0" . 'yii\\base\\Model' . "\0" . '_validators";N;s:25:"' . "\0" . 'yii\\base\\Model' . "\0" . '_scenario";s:7:"default";s:27:"' . "\0" . 'yii\\base\\Component' . "\0" . '_events";a:6:{s:11:"afterDelete";a:2:{i:0;a:2:{i:0;a:2:{i:0;O:47:"devgroup\\TagDependencyHelper\\ActiveRecordHelper":2:{s:5:"cache";s:5:"cache";s:5:"owner";r:1;}i:1;s:14:"invalidateTags";}i:1;N;}i:1;a:2:{i:0;a:2:{i:0;O:18:"app\\behaviors\\Tree":6:{s:11:"idAttribute";s:2:"id";s:17:"parentIdAttribute";s:9:"parent_id";s:9:"sortOrder";a:2:{s:10:"sort_order";i:4;s:2:"id";i:4;}s:15:"cascadeDeleting";b:0;s:15:"activeAttribute";s:6:"active";s:5:"owner";r:1;}i:1;s:11:"afterDelete";}i:1;N;}}s:11:"afterInsert";a:1:{i:0;a:2:{i:0;a:2:{i:0;r:59;i:1;s:14:"invalidateTags";}i:1;N;}}s:11:"afterUpdate";a:1:{i:0;a:2:{i:0;a:2:{i:0;r:59;i:1;s:14:"invalidateTags";}i:1;N;}}s:12:"beforeDelete";a:1:{i:0;a:2:{i:0;a:2:{i:0;O:28:"app\\behaviors\\CleanRelations":1:{s:5:"owner";r:1;}i:1;s:16:"cleanUpRelations";}i:1;N;}}s:12:"beforeInsert";a:1:{i:0;a:2:{i:0;a:2:{i:0;O:31:"yii\\behaviors\\TimestampBehavior":7:{s:18:"createdAtAttribute";s:10:"date_added";s:18:"updatedAtAttribute";s:13:"date_modified";s:5:"value";O:17:"yii\\db\\Expression":2:{s:10:"expression";s:5:"NOW()";s:6:"params";a:0:{}}s:10:"attributes";a:2:{s:12:"beforeInsert";a:1:{i:0;s:10:"date_added";}s:12:"beforeUpdate";a:1:{i:0;s:13:"date_modified";}}s:17:"skipUpdateOnClean";b:1;s:22:"preserveNonEmptyValues";b:0;s:5:"owner";r:1;}i:1;s:18:"evaluateAttributes";}i:1;N;}}s:12:"beforeUpdate";a:1:{i:0;a:2:{i:0;a:2:{i:0;r:99;i:1;s:18:"evaluateAttributes";}i:1;N;}}}s:35:"' . "\0" . 'yii\\base\\Component' . "\0" . '_eventWildcards";a:0:{}s:30:"' . "\0" . 'yii\\base\\Component' . "\0" . '_behaviors";a:5:{i:0;O:28:"app\\properties\\HasProperties":11:{s:44:"' . "\0" . 'app\\properties\\HasProperties' . "\0" . 'abstract_model";N;s:38:"' . "\0" . 'app\\properties\\HasProperties' . "\0" . 'eav_rows";N;s:36:"' . "\0" . 'app\\properties\\HasProperties' . "\0" . 'object";N;s:40:"' . "\0" . 'app\\properties\\HasProperties' . "\0" . 'properties";N;s:48:"' . "\0" . 'app\\properties\\HasProperties' . "\0" . 'property_key_to_id";a:0:{}s:53:"' . "\0" . 'app\\properties\\HasProperties' . "\0" . 'property_id_to_group_id";a:0:{}s:43:"' . "\0" . 'app\\properties\\HasProperties' . "\0" . 'static_values";N;s:51:"' . "\0" . 'app\\properties\\HasProperties' . "\0" . 'table_inheritance_row";N;s:48:"' . "\0" . 'app\\properties\\HasProperties' . "\0" . 'propertiesFormName";N;s:5:"props";N;s:5:"owner";r:1;}i:1;r:59;i:2;r:92;i:3;r:66;i:4;r:99;}}'), ]; $_SESSION = [ '__flash' => [], ];