class SystemInfoController

Returns responses for System Info routes.

Hierarchy

Expanded class hierarchy of SystemInfoController

File

drupal/core/modules/system/lib/Drupal/system/Controller/SystemInfoController.php, line 19
Contains \Drupal\system\Controller\SystemInfoController.

Namespace

Drupal\system\Controller
View source
class SystemInfoController implements ControllerInterface {

  /**
   * System Manager Service.
   *
   * @var \Drupal\system\SystemManager
   */
  protected $systemManager;

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container) {
    return new static($container
      ->get('system.manager'));
  }

  /**
   * Constructs a SystemInfoController object.
   *
   * @param \Drupal\system\SystemManager $systemManager
   *   System manager service.
   */
  public function __construct(SystemManager $systemManager) {
    $this->systemManager = $systemManager;
  }

  /**
   * Displays the site status report.
   *
   * @return string
   *   The current status of the Drupal installation.
   */
  public function status() {
    $requirements = $this->systemManager
      ->listRequirements();
    $this->systemManager
      ->fixAnonymousUid();
    return theme('status_report', array(
      'requirements' => $requirements,
    ));
  }

  /**
   * Returns the contents of phpinfo().
   *
   * @return \Symfony\Component\HttpFoundation\Response
   *   A response object to be sent to the client.
   */
  public function php() {
    ob_start();
    phpinfo();
    $output = ob_get_clean();
    return new Response($output);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SystemInfoController::$systemManager protected property System Manager Service.
SystemInfoController::create public static function Instantiates a new instance of this controller. Overrides ControllerInterface::create
SystemInfoController::php public function Returns the contents of phpinfo().
SystemInfoController::status public function Displays the site status report.
SystemInfoController::__construct public function Constructs a SystemInfoController object.