Drupal 8  8.0.2
HookDiscovery Class Reference
Inheritance diagram for HookDiscovery:

Public Member Functions

 __construct (ModuleHandlerInterface $module_handler, $hook)
 
 getDefinitions ()
 
- Public Member Functions inherited from DiscoveryInterface
 getDefinition ($plugin_id, $exception_on_invalid=TRUE)
 
 hasDefinition ($plugin_id)
 

Protected Attributes

 $hook
 
 $moduleHandler
 

Detailed Description

Provides a hook-based plugin discovery class.

Constructor & Destructor Documentation

__construct ( ModuleHandlerInterface  $module_handler,
  $hook 
)

Constructs a Drupal object.

Parameters
\Drupal\Core\Extension\ModuleHandlerInterface$module_handlerThe module handler.
string$hookThe Drupal hook that a module can implement in order to interface to this discovery class.

References Drupal\moduleHandler().

Here is the call graph for this function:

Member Function Documentation

getDefinitions ( )

{Gets the definition of all plugins for this type.

Returns
mixed[] An array of plugin definitions (empty array if no definitions were found). Keys are plugin IDs.
}

Implements DiscoveryInterface.

References Drupal\moduleHandler().

Here is the call graph for this function:


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