Drupal 8  8.0.2
EntityDeriver Class Reference
Inheritance diagram for EntityDeriver:

Public Member Functions

 __construct ($base_plugin_id, EntityManagerInterface $entity_manager)
 
 getDerivativeDefinition ($derivative_id, $base_plugin_definition)
 
 getDerivativeDefinitions ($base_plugin_definition)
 

Static Public Member Functions

static create (ContainerInterface $container, $base_plugin_id)
 

Protected Attributes

 $derivatives = array()
 
 $basePluginId
 
 $entityManager
 

Detailed Description

Provides data type plugins for each existing entity type and bundle.

Constructor & Destructor Documentation

__construct (   $base_plugin_id,
EntityManagerInterface  $entity_manager 
)

Constructs an EntityDeriver object.

Parameters
string$base_plugin_idThe base plugin ID.
\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager.

References Drupal\entityManager().

Here is the call graph for this function:

Member Function Documentation

static create ( ContainerInterface  $container,
  $base_plugin_id 
)
static

{Creates a new class instance.

Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$containerThe container to pull out services used in the fetcher.
string$base_plugin_idThe base plugin ID for the plugin ID.
Returns
static Returns an instance of this fetcher.
}

Implements ContainerDeriverInterface.

getDerivativeDefinition (   $derivative_id,
  $base_plugin_definition 
)

{Gets the definition of a derivative plugin.

Parameters
string$derivative_idThe derivative id. The id must uniquely identify the derivative within a given base plugin, but derivative ids can be reused across base plugins.
mixed$base_plugin_definitionThe definition of the base plugin from which the derivative plugin is derived. It is maybe an entire object or just some array, depending on the discovery mechanism.
Returns
array The full definition array of the derivative plugin, typically a merge of $base_plugin_definition with extra derivative-specific information. NULL if the derivative doesn't exist.
}

Implements DeriverInterface.

References EntityDeriver\getDerivativeDefinitions().

Here is the call graph for this function:

getDerivativeDefinitions (   $base_plugin_definition)

{Gets the definition of all derivatives of a base plugin.

Parameters
array$base_plugin_definitionThe definition array of the base plugin.
Returns
array An array of full derivative definitions keyed on derivative id.
See Also
getDerivativeDefinition()
}

Implements DeriverInterface.

References Drupal\entityManager().

Referenced by EntityDeriver\getDerivativeDefinition().

Here is the call graph for this function:

Here is the caller graph for this function:


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