class SystemManager (View source)

System Manager Service.

Constants

REQUIREMENT_OK

Requirement severity -- Requirement successfully met.

REQUIREMENT_WARNING

Requirement severity -- Warning condition; proceed but flag warning.

REQUIREMENT_ERROR

Requirement severity -- Error condition; abort installation.

Properties

protected ModuleHandlerInterface $moduleHandler

Module handler service.

protected RequestStack $requestStack

The request stack.

protected MenuLinkTreeInterface $menuTree

The menu link tree manager.

protected MenuActiveTrailInterface $menuActiveTrail

The active menu trail service.

protected array $menuItems

A static cache of menu items.

Methods

__construct(ModuleHandlerInterface $module_handler, RequestStack $request_stack, MenuLinkTreeInterface $menu_tree, MenuActiveTrailInterface $menu_active_trail)

Constructs a SystemManager object.

bool
checkRequirements()

Checks for requirement severity.

array
listRequirements()

Displays the site status report. Can also be used as a pure check.

The
getMaxSeverity($requirements)

Extracts the highest severity from the requirements array.

array
getBlockContents()

Loads the contents of a menu block.

array
getAdminBlock(MenuLinkInterface $instance)

Provide a single block on the administration overview page.

Details

__construct(ModuleHandlerInterface $module_handler, RequestStack $request_stack, MenuLinkTreeInterface $menu_tree, MenuActiveTrailInterface $menu_active_trail)

Constructs a SystemManager object.

Parameters

ModuleHandlerInterface $module_handler

The module handler.

RequestStack $request_stack

The request stack.

MenuLinkTreeInterface $menu_tree

The menu tree manager.

MenuActiveTrailInterface $menu_active_trail

The active menu trail service.

bool checkRequirements()

Checks for requirement severity.

Return Value

bool

Returns the status of the system.

array listRequirements()

Displays the site status report. Can also be used as a pure check.

Return Value

array

An array of system requirements.

The getMaxSeverity($requirements)

Extracts the highest severity from the requirements array.

Parameters

$requirements

An array of requirements, in the same format as is returned by hook_requirements().

Return Value

The

highest severity in the array.

array getBlockContents()

Loads the contents of a menu block.

This function is often a destination for these blocks. For example, 'admin/structure/types' needs to have a destination to be valid in the Drupal menu system, but too much information there might be hidden, so we supply the contents of the block.

Return Value

array

A render array suitable for \Drupal\Core\Render\RendererInterface::render().

array getAdminBlock(MenuLinkInterface $instance)

Provide a single block on the administration overview page.

Parameters

MenuLinkInterface $instance

The menu item to be displayed.

Return Value

array

An array of menu items, as expected by admin-block-content.html.twig.