显示找回密码页面
@return array|string|Response
550794
public function actionRequest()
    {
        if (!$this->enablePasswordRecovery) {
            return $this->redirect(['/user/security/login']);
        }
        /** @var RecoveryForm $model */
        $model = new RecoveryForm(['scenario' => 'request']);
        if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
            Yii::$app->response->format = Response::FORMAT_JSON;
            return ActiveForm::validate($model);
        }
        if ($model->load(Yii::$app->request->post()) && $model->sendRecoveryMessage()) {
            return $this->redirect(['/user/recovery/request']);
        }
        return $this->render('request', ['model' => $model]);
    }
1261778
public function render()
    {
        if ($cachedView = $this->getCachedView()) {
            return response()->make($cachedView, 200, ['Content-type' => 'text/xml']);
        }

        $sitemap = response()->view('sitemap::sitemap', [
            '__tags' => $this->getTags(),
            '__hasImages' => $this->imagesPresent(),
            '__hasVideos' => $this->videosPresent(),
            '__isMultilingual' => $this->multilingualTagsPresent()
        ], 200, ['Content-type' => 'text/xml']);

        $this->saveCachedView($sitemap);

        return $sitemap;
    }
712315
public function getActionText()
    {
        switch ($this->action) {
            case 'follow_user':
                return Yii::t('doing', 'follow on you');
                break;
            case 'answer_question':
                return Yii::t('doing', 'answered the question');
                break;
            case 'follow_question':
                return Yii::t('doing', 'is concerned about the problem');
                break;
            case 'create_article':
                return Yii::t('doing', 'Share an article');
                break;
            case 'create_note':
                return Yii::t('doing', 'Share an note');
                break;
            case 'create_news':
                return Yii::t('doing', 'Share an news');
                break;
            case 'create_live':
                return Yii::t('doing', 'Create the stream');
                break;
            case 'join_live':
                return Yii::t('doing', 'join the live');
                break;
            default:
                return null;
                break;
        }
    }
1308043
public function indexAction()
    {
        $instance = $this->getCurrentInstance();
        if($instance) {
            
            $worker = $this->getWorker();
            // Worker can be undefined if server went away
            // For the current instance or if there is no instance selected
            if($worker) {
                return $this->render(
                    $this->getTemplatePath().'index.html.twig',
                    array(
                        'instance' => $worker->getInstance(),
                        'infos'    => $worker->getInfos(),
                        'slowLogs'  => $worker->getSlowLogs(),
                        'keyspace'  => $worker->getKeyspace()
                    )
                );
            }
        }
        
        return new RedirectResponse($this->generateUrl('ringo_php_redmon_instances'));
    }
1317100
public function indexAction()
    {
        /** @var Response $response */
        $response = $this->getResponse();

        $headers = new Headers();

        $headers->addHeaders(
            [
                'cache-control' => 'no-store, no-cache, must-revalidate',
                'content-type' => 'application/javascript',
                'pragma' => 'no-cache',
            ]
        );

        $response->setHeaders(
            $headers
        );

        $isAllowed = $this->cmsPermissionChecks->siteAdminCheck($this->siteService->getCurrentSite());

        if (!$isAllowed) {
            $response->setContent(
                '// rcmBlockConfigs not available'
            );

            return $response;
        }

        $content = $this->rendererAvailableBlocksJs->__invoke();

        $response->setContent(
            $content
        );

        return $response;
    }
266541
public function listAction()
    {
        $params     = $this->params();
        $request    = $this->getRequest();
        $bodyOnly   = $request->isXmlHttpRequest();
        $page       = $params->fromRoute( 'page',
            $request->getPost( 'page',
                $request->getQuery( 'page', 1 )
            )
        );

        $view = new ViewModel( array(
            'paginator' => $this->getPaginator(),
            'page'      => ( (int) $page ) ?: 1,
            'format'    => $bodyOnly,
        ) );

        if ( $bodyOnly )
        {
            $view->setTerminal( true );
        }

        return $view;
    }
697813
private function getUrl() {
        $url = getSourceUrl($_SERVER['REQUEST_URI']);
        //移除page参数
        $urlInfo = parse_url($url);
        if ( $urlInfo['query'] ) {
            parse_str($urlInfo['query'], $query);
            unset($query['page']);
            if ( !empty($query) ) {
                foreach ( $query as $key => $value ) {
                    $query[$key] = urldecode($value);
                }
                $url = $urlInfo['path'].'?'.http_build_query($query);
            } else {
                $url = $urlInfo['path'];
            }

        }
        //判断是否还有其他参数
        $position = strpos($url, '?');
        if ( strpos($url, '?') === false ) {
            return $url.'?page=';
        } else if( ($position + 1) == strlen($url) ) {
            return $url.'page=';
        } else {
            return $url.'&page=';
        }
    }
190228
public function getCommentRSSLinkPage()
    {
        return Controller::join_links(
            $this->getCommentRSSLink(),
            str_replace('\\', '-', get_class($this->owner)),
            $this->owner->ID
        );
    }
1040730
public function render()
    {
        $items = [
            'header'      => $this->header,
            'description' => $this->description,
            'breadcrumb'  => $this->breadcrumb,
            'content'     => $this->build(),
        ];

        return view('merchant::content', $items)->render();
    }
1009663
public function index()
    {
        return $this->core->api()->response(
            [
                'layout' => $this->transformPresencesForApi($this->menu->getMenuLayout()),
            ]
        );
    }
1128103
public function indexAction()
    {
        $response = $this->response;

        $mainPage = new \stdClass();
        $mainPage->services = $this->determineServices(
            $this->restUtils->getOptionRoutes()
        );

        $mainPage->thirdparty = $this->registerThirdPartyServices();

        $response->setContent(json_encode($mainPage));
        $response->setStatusCode(Response::HTTP_OK);
        $response->headers->set('Link', $this->prepareLinkHeader());

        // todo: make sure, that the correct content type is set.
        // todo: this should be covered by a kernel.response event listener?
        $response->headers->set('Content-Type', 'application/json');

        return $response;
    }
618396
public function display()
    {
        $path = func_get_args();

        $count = count($path);
        if (!$count) {
            return $this->redirect('/');
        }
        $page = $subpage = null;

        if (!empty($path[0])) {
            $page = $path[0];
        }
        if (!empty($path[1])) {
            $subpage = $path[1];
        }
        $this->set(compact('page', 'subpage'));

        try {
            $this->render(implode('/', $path));
        } catch (MissingTemplateException $e) {
            if (Configure::read('debug')) {
                throw $e;
            }
            throw new NotFoundException();
        }
    }
733551
public function index()
	{
		$posts = $this->posts->active(100);

		$data = array(
			'posts'   => $posts,
			'updated' => isset($posts[0]) ? $posts[0]->atom_date : date('Y-m-d H:i:s'),
		);

		return Response::view($this->theme.'.atom', $data, 200, array(
			'Content-Type' => 'application/rss+xml; charset=UTF-8',
		));
	}
1345679
public function indexAction()
    {
        /* @todo: move this into a listener.
         *
         * The following lines allow to override get param[q] with the
         * param from route. This feature is needed for a landing-page feature, where
         * human readable urls like http://yawik.org/demo/de/jobs/sales.html
         *
         * move the Logic into a Listener, which can be activated, if needed
         */
        $request = $this->getRequest();
        $getParams = $request->getQuery();
        $routeParams = $this->params()->fromRoute();
        if (isset($routeParams['q']) && !isset($getParams['q'])) {
            $getParams['q']=$routeParams['q'];
        }

        $result = $this->pagination([
                'params' => ['Jobs_Board', [
                    'q',
                    'count' => $this->options['count'],
                    'page' => 1,
                    'l',
                    'd' => 10]
                ],
                'form' => ['as' => 'filterForm', 'Jobs/JobboardSearch'],
                'paginator' => ['as' => 'jobs', 'Jobs/Board']
            ]);

        $organizationImageCache = $this->imageFileCacheManager;

        $result['organizationImageCache'] = $organizationImageCache;

        return new ViewModel($result);
    }
277680
private function getCsrfHtml()
    {
        $html =  '<input type="hidden" name="_token" value="'.$this->getCsrfToken().'">';
        /**
         * 隐藏表单的html传递给前端
         */
        $this->vitex->res->set('csrf_token_html',$html);
        return $html;
    }
68689
public function showNew()
    {
        $pages_list = $this->core->api('Page/all', 'GET')->run();
        return $this->templates->render("Main::Pages/New", [
            "messages" => [
                'error' => '',
                'info' => '',
                'success' => '',
                'warning' => ''
            ],
            "request" => [],
            "pages" => $pages_list['response']
        ]);
    }
669089
public function actionRss()
    {
        $xml['channel']['title'] = yii::$app->feehi->website_title;
        $xml['channel']['description'] = yii::$app->feehi->seo_description;
        $xml['channel']['lin'] = yii::$app->getUrlManager()->getHostInfo();
        $xml['channel']['generator'] = yii::$app->getUrlManager()->getHostInfo();
        $models = Article::find()->limit(10)->where(['status'=>Article::ARTICLE_PUBLISHED, 'type'=>Article::ARTICLE])->orderBy('id desc')->all();
        foreach ($models as $model){
            $xml['channel']['item'][] = [
                'title' => $model->title,
                'link' => Url::to(['article/view', 'id'=>$model->id]),
                'pubData' => date('Y-m-d H:i:s', $model->created_at),
                'source' => yii::$app->feehi->website_title,
                'author' => $model->author_name,
                'description' => $model->summary,
            ];
        }
        yii::configure(yii::$app->getResponse(), [
            'formatters' => [
                Response::FORMAT_XML => [
                    'class' => XmlResponseFormatter::className(),
                    'rootTag' => 'rss',
                    'version' => '1.0',
                    'encoding' => 'utf-8'
                ]
            ]
        ]);
        yii::$app->getResponse()->format = Response::FORMAT_XML;
        return $xml;
    }