if (checkdate($dt[1], $dt[2], $dt[0])) { $posts->andWhere(['<=', 'publish_date', $date]); } } // End if todate if ($date = $this->getParam('date')) { if (app()->language == "fa-IR") { $dt = explode("-", $date); $date = app()->jdf->jalaliToGregorian($dt[0], $dt[1], $dt[2]); } $dt = explode("-", $date); if (checkdate($dt[1], $dt[2], $dt[0])) { $posts->andWhere(['publish_date' => $date]); } } // End if todate
} } // End if todate if ($date = $this->getParam('date')) { if (app()->language == "fa-IR") { $dt = explode("-", $date); $date = app()->jdf->jalaliToGregorian($dt[0], $dt[1], $dt[2]); } $dt = explode("-", $date); if (checkdate($dt[1], $dt[2], $dt[0])) { $posts->andWhere(['publish_date' => $date]);
if (!$content_service_is_valid) { $content_service = 'news'; } $this->component = $this->module->ContentComponent; $this->component->postType($content_service); $this->component->havePost(); return $this->component; } public function beforeAction($action) {
app()->request->setPathInfo($pathInfo); } if (parent::beforeAction($action)) { if (!$portal) { $portal = $this->findPortal($this->component()->postType()); } if (!$portal) { $portal = $this->findPortal('blog'); }
break; } } $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules
$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 Core\web\Application($config); $application->run();
$_GET = [ 'request' => 'news/date/blog/نشریات-الکترونیکی-شهرداری-قم', ];