original_string: public function run($action = null, $params = [])
      {
          $this->action = $action;
          $this->params = $params;
  
          /*
           * Check security token.
           */
          if (!$this->verifyCsrfToken()) {
              return Response::make(Lang::get('backend::lang.page.invalid_token.label'), 403);
          }
  
          /*
           * Check forced HTTPS protocol.
           */
          if (!$this->verifyForceSecure()) {
              return Redirect::secure(Request::path());
          }
  
          /*
           * Determine if this request is a public action.
           */
          $isPublicAction = in_array($action, $this->publicActions);
  
          /*
           * Check that user is logged in and has permission to view this page
           */
          if (!$isPublicAction) {
  
              /*
               * Not logged in, redirect to login screen or show ajax error.
               */
              if (!BackendAuth::check()) {
                  return Request::ajax()
                      ? Response::make(Lang::get('backend::lang.page.access_denied.label'), 403)
                      : Backend::redirectGuest('backend/auth');
              }
  
              /*
               * Check access groups against the page definition
               */
              if ($this->requiredPermissions && !$this->user->hasAnyAccess($this->requiredPermissions)) {
                  return Response::make(View::make('backend::access_denied'), 403);
              }
          }
  
          /*
           * Extensibility
           */
          if ($event = $this->fireSystemEvent('backend.page.beforeDisplay', [$action, $params])) {
              return $event;
          }
  
          /*
           * Set the admin preference locale
           */
          BackendPreference::setAppLocale();
          BackendPreference::setAppFallbackLocale();
  
          /*
           * Execute AJAX event
           */
          if ($ajaxResponse = $this->execAjaxHandlers()) {
              return $ajaxResponse;
          }
  
          /*
           * Execute postback handler
           */
          if (
              ($handler = post('_handler')) &&
              ($handlerResponse = $this->runAjaxHandler($handler)) &&
              $handlerResponse !== true
          ) {
              return $handlerResponse;
          }
  
          /*
           * Execute page action
           */
          $result = $this->execPageAction($action, $params);
  
          if (!is_string($result)) {
              return $result;
          }
  
          return Response::make($result, $this->statusCode);
      }
code: public function run($action = null, $params = [])
      {
          $this->action = $action;
          $this->params = $params;
  
          /*
           * Check security token.
           */
          if (!$this->verifyCsrfToken()) {
              return Response::make(Lang::get('backend::lang.page.invalid_token.label'), 403);
          }
  
          /*
           * Check forced HTTPS protocol.
           */
          if (!$this->verifyForceSecure()) {
              return Redirect::secure(Request::path());
          }
  
          /*
           * Determine if this request is a public action.
           */
          $isPublicAction = in_array($action, $this->publicActions);
  
          /*
           * Check that user is logged in and has permission to view this page
           */
          if (!$isPublicAction) {
  
              /*
               * Not logged in, redirect to login screen or show ajax error.
               */
              if (!BackendAuth::check()) {
                  return Request::ajax()
                      ? Response::make(Lang::get('backend::lang.page.access_denied.label'), 403)
                      : Backend::redirectGuest('backend/auth');
              }
  
              /*
               * Check access groups against the page definition
               */
              if ($this->requiredPermissions && !$this->user->hasAnyAccess($this->requiredPermissions)) {
                  return Response::make(View::make('backend::access_denied'), 403);
              }
          }
  
          /*
           * Extensibility
           */
          if ($event = $this->fireSystemEvent('backend.page.beforeDisplay', [$action, $params])) {
              return $event;
          }
  
          /*
           * Set the admin preference locale
           */
          BackendPreference::setAppLocale();
          BackendPreference::setAppFallbackLocale();
  
          /*
           * Execute AJAX event
           */
          if ($ajaxResponse = $this->execAjaxHandlers()) {
              return $ajaxResponse;
          }
  
          /*
           * Execute postback handler
           */
          if (
              ($handler = post('_handler')) &&
              ($handlerResponse = $this->runAjaxHandler($handler)) &&
              $handlerResponse !== true
          ) {
              return $handlerResponse;
          }
  
          /*
           * Execute page action
           */
          $result = $this->execPageAction($action, $params);
  
          if (!is_string($result)) {
              return $result;
          }
  
          return Response::make($result, $this->statusCode);
      }
code_tokens: public function run ( $ action = null , $ params = [ ] ) { $ this -> action = $ action ; $ this -> params = $ params ; /*
           * Check security token.
           */ if ( ! $ this -> verifyCsrfToken ( ) ) { return Response :: make ( Lang :: get ( 'backend::lang.page.invalid_token.label' ) , 403 ) ; } /*
           * Check forced HTTPS protocol.
           */ if ( ! $ this -> verifyForceSecure ( ) ) { return Redirect :: secure ( Request :: path ( ) ) ; } /*
           * Determine if this request is a public action.
           */ $ isPublicAction = in_array ( $ action , $ this -> publicActions ) ; /*
           * Check that user is logged in and has permission to view this page
           */ if ( ! $ isPublicAction ) { /*
               * Not logged in, redirect to login screen or show ajax error.
               */ if ( ! BackendAuth :: check ( ) ) { return Request :: ajax ( ) ? Response :: make ( Lang :: get ( 'backend::lang.page.access_denied.label' ) , 403 ) : Backend :: redirectGuest ( 'backend/auth' ) ; } /*
               * Check access groups against the page definition
               */ if ( $ this -> requiredPermissions && ! $ this -> user -> hasAnyAccess ( $ this -> requiredPermissions ) ) { return Response :: make ( View :: make ( 'backend::access_denied' ) , 403 ) ; } } /*
           * Extensibility
           */ if ( $ event = $ this -> fireSystemEvent ( 'backend.page.beforeDisplay' , [ $ action , $ params ] ) ) { return $ event ; } /*
           * Set the admin preference locale
           */ BackendPreference :: setAppLocale ( ) ; BackendPreference :: setAppFallbackLocale ( ) ; /*
           * Execute AJAX event
           */ if ( $ ajaxResponse = $ this -> execAjaxHandlers ( ) ) { return $ ajaxResponse ; } /*
           * Execute postback handler
           */ if ( ( $ handler = post ( '_handler' ) ) && ( $ handlerResponse = $ this -> runAjaxHandler ( $ handler ) ) && $ handlerResponse !== true ) { return $ handlerResponse ; } /*
           * Execute page action
           */ $ result = $ this -> execPageAction ( $ action , $ params ) ; if ( ! is_string ( $ result ) ) { return $ result ; } return Response :: make ( $ result , $ this -> statusCode ) ; }
docstring: Execute the controller action.
  @param string $action The action name.
  @param array $params Routing parameters to pass to the action.
  @return mixed The action result.
docstring_tokens: Execute the controller action .