You are here

class Info in DRD Agent 8.3

Same name and namespace in other branches
  1. 4.0.x src/Agent/Action/Info.php \Drupal\drd_agent\Agent\Action\Info

Provides a 'Info' code.

Hierarchy

Expanded class hierarchy of Info

File

src/Agent/Action/Info.php, line 13

Namespace

Drupal\drd_agent\Agent\Action
View source
class Info extends Base {

  /**
   * {@inheritdoc}
   */
  public function execute() {
    $config = $this->configFactory
      ->get('system.site');

    // Initial set of information.
    $result = [
      'root' => DRUPAL_ROOT,
      'version' => Drupal::VERSION,
      'name' => $config
        ->get('name'),
      'globals' => [],
      'settings' => Settings::getAll(),
      'review' => SecurityReview::create($this->container)
        ->collect(),
      'monitoring' => Monitoring::create($this->container)
        ->collect(),
    ];

    // Check run-time requirements and status information.
    if ($systemManager = $this->container
      ->get('system.manager')) {
      $result['requirements'] = $systemManager
        ->listRequirements();
    }
    $result['variables'] = $GLOBALS['config'];
    foreach ($GLOBALS as $key => $value) {
      if (!in_array($key, [
        'config',
        'GLOBALS',
        'autoloader',
        'kernel',
        'request',
      ])) {
        $result['globals'][$key] = $value;
      }
    }
    return $result;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Base::$accountSwitcher protected property
Base::$arguments private property
Base::$configFactory protected property
Base::$container protected property
Base::$crypt protected property Crypt object for this DRD request.
Base::$database protected property
Base::$debugMode private property
Base::$entityTypeManager protected property
Base::$fileSystem protected property
Base::$logger protected property
Base::$messenger protected property
Base::$moduleHandler protected property
Base::$state protected property
Base::$time protected property
Base::authenticate private function Authenticate the request or throw an exception.
Base::authorize public function Authorize the DRD instance, all validations have passed successfully. Overrides BaseInterface::authorize
Base::authorizeBySecret public function Callback to authorize a DRD instance with a given secret.
Base::create public static function Instantiates a new instance of this class. Overrides ContainerInjectionInterface::create
Base::getArguments public function Get the arguments for this request. Overrides BaseInterface::getArguments
Base::getCryptInstance public function Get authorised Crypt object or FALSE if none is available. Overrides BaseInterface::getCryptInstance
Base::getDbInfo public function Get an array of database connection information. Overrides BaseInterface::getDbInfo
Base::getDebugMode public function Get the debug mode. Overrides BaseInterface::getDebugMode
Base::getMessages public function Overrides BaseInterface::getMessages
Base::init public function Overrides BaseInterface::init
Base::ott public function Validate a one-time-token. Overrides BaseInterface::ott
Base::promoteUser public function Change current session to user 1. Overrides BaseInterface::promoteUser
Base::readInput private function Read and decode the input from the POST request.
Base::realPath public function Overrides BaseInterface::realPath
Base::run public function Main callback to execute an action.
Base::SEC_AUTH_ACQUIA constant
Base::SEC_AUTH_PANTHEON constant
Base::SEC_AUTH_PLATFORMSH constant
Base::setDebugMode public function Set the debug mode. Overrides BaseInterface::setDebugMode
Base::toArray private function Recursivly convert request arguments to an array.
Base::watchdog public function Logging if in debug mode. Overrides BaseInterface::watchdog
Base::__construct public function Base constructor.
Info::execute public function Execute an action. Overrides Base::execute