original_string: public function actionContents($name = '')
      {
          if (empty($name)) {
              $name = Content::TERMS_AND_CONDS;
          }
          $model = Content::fill($name);
          if ($model->load(Yii::$app->request->post())) {
              if (User::can(Rbac::PERM_CHANGE_SETTINGS)) {
                  if ($model->save()) {
                      $this->success(Yii::t('podium/flash', 'Content has been saved.'));
                  } else {
                      $this->error(Yii::t('podium/flash', 'Sorry! There was some error while saving the content.'));
                  }
              } else {
                  $this->error(Yii::t('podium/flash', 'You are not allowed to perform this action.'));
              }
              return $this->refresh();
          }
          return $this->render('contents', ['model' => $model]);
      }
code: public function actionContents($name = '')
      {
          if (empty($name)) {
              $name = Content::TERMS_AND_CONDS;
          }
          $model = Content::fill($name);
          if ($model->load(Yii::$app->request->post())) {
              if (User::can(Rbac::PERM_CHANGE_SETTINGS)) {
                  if ($model->save()) {
                      $this->success(Yii::t('podium/flash', 'Content has been saved.'));
                  } else {
                      $this->error(Yii::t('podium/flash', 'Sorry! There was some error while saving the content.'));
                  }
              } else {
                  $this->error(Yii::t('podium/flash', 'You are not allowed to perform this action.'));
              }
              return $this->refresh();
          }
          return $this->render('contents', ['model' => $model]);
      }
code_tokens: public function actionContents ( $ name = '' ) { if ( empty ( $ name ) ) { $ name = Content :: TERMS_AND_CONDS ; } $ model = Content :: fill ( $ name ) ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) ) { if ( User :: can ( Rbac :: PERM_CHANGE_SETTINGS ) ) { if ( $ model -> save ( ) ) { $ this -> success ( Yii :: t ( 'podium/flash' , 'Content has been saved.' ) ) ; } else { $ this -> error ( Yii :: t ( 'podium/flash' , 'Sorry! There was some error while saving the content.' ) ) ; } } else { $ this -> error ( Yii :: t ( 'podium/flash' , 'You are not allowed to perform this action.' ) ) ; } return $ this -> refresh ( ) ; } return $ this -> render ( 'contents' , [ 'model' => $ model ] ) ; }
docstring: Listing the contents.
  @param string $name content name
  @return string|Response
docstring_tokens: Listing the contents .