Drupal 8  8.0.2
SystemManager Class Reference

Public Member Functions

 __construct (ModuleHandlerInterface $module_handler, EntityManagerInterface $entity_manager, RequestStack $request_stack, MenuLinkTreeInterface $menu_tree, MenuActiveTrailInterface $menu_active_trail)
 
 checkRequirements ()
 
 listRequirements ()
 
 getMaxSeverity (&$requirements)
 
 getBlockContents ()
 

Data Fields

const REQUIREMENT_OK = 0
 
const REQUIREMENT_WARNING = 1
 
const REQUIREMENT_ERROR = 2
 

Protected Attributes

 $moduleHandler
 
 $requestStack
 
 $menuTree
 
 $menuActiveTrail
 
 $menuItems
 

Detailed Description

System Manager Service.

Constructor & Destructor Documentation

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

Constructs a SystemManager object.

Parameters
\Drupal\Core\Extension\ModuleHandlerInterface$module_handlerThe module handler.
\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager.
\Symfony\Component\HttpFoundation\RequestStack$request_stackThe request stack.
\Drupal\Core\Menu\MenuLinkTreeInterface$menu_treeThe menu tree manager.
\Drupal\Core\Menu\MenuActiveTrailInterface$menu_active_trailThe active menu trail service.

References Drupal\menuTree(), Drupal\moduleHandler(), and Drupal\requestStack().

Here is the call graph for this function:

Member Function Documentation

checkRequirements ( )

Checks for requirement severity.

Returns
bool Returns the status of the system.

References SystemManager\getMaxSeverity(), and SystemManager\listRequirements().

Here is the call graph for this function:

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.

Returns
array A render array suitable for drupal_render.

References t().

Here is the call graph for this function:

getMaxSeverity ( $requirements)

Extracts the highest severity from the requirements array.

Parameters
$requirementsAn array of requirements, in the same format as is returned by hook_requirements().
Returns
The highest severity in the array.

Referenced by SystemManager\checkRequirements().

Here is the caller graph for this function:

listRequirements ( )

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

Returns
array An array of system requirements.

References Drupal\moduleHandler().

Referenced by SystemManager\checkRequirements().

Here is the call graph for this function:

Here is the caller graph for this function:

Field Documentation

const REQUIREMENT_ERROR = 2

Requirement severity – Error condition; abort installation.

const REQUIREMENT_OK = 0

Requirement severity – Requirement successfully met.

const REQUIREMENT_WARNING = 1

Requirement severity – Warning condition; proceed but flag warning.


The documentation for this class was generated from the following file: