} public function actionCategory($slug){ $content = $this->getArticleList($slug); return $this->render('content',['content' => $content]); } public function actionMunkatars($page,$slug){ $content = Item::find()->where(['slug'=>$slug])->one(); $people = Item::find()->where(['category_id'=>$content->category_id])->all(); return $this->render('munkatars',['page' => $page,'content' => $content,'people' => $people]); } public function actionService($page,$slug){ $content = Item::find()->where(['slug'=>$slug])->one(); return $this->render('service_sub',['page' => $page,'content' => $content]); } public function actionContact(){
$content = $this->getArticleList($slug); return $this->render('content',['content' => $content]); } public function actionMunkatars($page,$slug){ $content = Item::find()->where(['slug'=>$slug])->one(); $people = Item::find()->where(['category_id'=>$content->category_id])->all(); return $this->render('munkatars',['page' => $page,'content' => $content,'people' => $people]); } public function actionService($page,$slug){ $content = Item::find()->where(['slug'=>$slug])->one(); return $this->render('service_sub',['page' => $page,'content' => $content]);
public function actionCategory($slug){ $content = $this->getArticleList($slug); return $this->render('content',['content' => $content]); } public function actionMunkatars($slug){ return parent::actionMunkatars('dorog',$slug); } public function actionService($slug){ return parent::actionService('dorog',$slug); } }
$args = $this->controller->bindActionParams($this, $params); Yii::trace('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); Yii::$app->controller = $oldController; return $result; } else { $id = $this->getUniqueId(); throw new InvalidRouteException('Unable to resolve the request "' . ($id === '' ? $route : $id . '/' . $route) . '".');
$params = $this->catchAll; unset($params[0]); } try { Yii::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $response = $this->getResponse(); if ($result !== null) { $response->data = $result;
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__ . '/vendor/autoload.php'); require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php'); $config = require(__DIR__ . '/app/config/web.php'); (new yii\web\Application($config))->run();
$_GET = [ 'slug' => 'dr-g-kovacs-lilla-2', ]; $_SERVER = [ 'HTTP_HOST' => 'welldental.hu', 'HTTP_ACCEPT' => '*/*', 'HTTP_USER_AGENT' => 'claudebot', 'HTTP_X_FORWARDED_PROTO' => 'https', 'HTTP_X_FORWARDED_SSL' => 'on', 'HTTP_X_FORWARDED_FOR' => '3.238.62.124', 'HTTP_X_FORWARDED_HOST' => 'welldental.hu', 'HTTP_X_FORWARDED_SERVER' => 'welldental.hu', 'HTTP_CONNECTION' => 'Keep-Alive', 'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'SERVER_SIGNATURE' => 'Apache/2.4.25 (Debian) Server at welldental.hu Port 80 ', 'SERVER_SOFTWARE' => 'Apache/2.4.25 (Debian)', 'SERVER_NAME' => 'welldental.hu', 'SERVER_ADDR' => '192.168.64.2', 'SERVER_PORT' => '80', 'REMOTE_ADDR' => '192.168.64.1', 'DOCUMENT_ROOT' => '/var/www/html/website', 'REQUEST_SCHEME' => 'http', 'CONTEXT_PREFIX' => '', 'CONTEXT_DOCUMENT_ROOT' => '/var/www/html/website', 'SERVER_ADMIN' => 'admin@localhost', 'SCRIPT_FILENAME' => '/var/www/html/website/index.php', 'REMOTE_PORT' => '58140', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_METHOD' => 'GET', 'QUERY_STRING' => '', 'REQUEST_URI' => '/index.php/dorog/munkatars/dr-g-kovacs-lilla-2', 'SCRIPT_NAME' => '/index.php', 'PATH_INFO' => '/dorog/munkatars/dr-g-kovacs-lilla-2', 'PATH_TRANSLATED' => 'redirect:/index.php/munkatars/dr-g-kovacs-lilla-2', 'PHP_SELF' => '/index.php/dorog/munkatars/dr-g-kovacs-lilla-2', 'REQUEST_TIME_FLOAT' => 1711637237.4660001, 'REQUEST_TIME' => 1711637237, ];