modules/sitemap/backend/controllers/DefaultController.php
/**
     * Render option form for sitemap in backend.
     *
     * @return string
     */
Render option form for sitemap in backend.
@return string
Render option form for sitemap in backend . @return string
public function actionIndex()
    {
        $option = Option::get($this->_optionName);
        if (!$option) {
            return $this->redirect(['install']);
        }
        $postTypes = PostType::find()->all();
        $taxonomies = Taxonomy::find()->all();
        if ($post = Yii::$app->request->post('Option')) {
            if (Option::set($this->_optionName, $post['option_value'])) {
                return $this->redirect(['index']);
            }
        }
        return $this->render('index', [
            'option'     => $option,
            'postTypes'  => $postTypes,
            'taxonomies' => $taxonomies,
        ]);
    }
public function actionIndex ( ) { $ option = Option :: get ( $ this -> _optionName ) ; if ( ! $ option ) { return $ this -> redirect ( [ 'install' ] ) ; } $ postTypes = PostType :: find ( ) -> all ( ) ; $ taxonomies = Taxonomy :: find ( ) -> all ( ) ; if ( $ post = Yii :: $ app -> request -> post ( 'Option' ) ) { if ( Option :: set ( $ this -> _optionName , $ post [ 'option_value' ] ) ) { return $ this -> redirect ( [ 'index' ] ) ; } } return $ this -> render ( 'index' , [ 'option' => $ option , 'postTypes' => $ postTypes , 'taxonomies' => $ taxonomies , ] ) ; }
Render option form for sitemap in backend.
Render option form for sitemap in backend .