Drupal 8  8.0.2
ConfigEntityMapper Class Reference
Inheritance diagram for ConfigEntityMapper:

Public Member Functions

 __construct ($plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config, LocaleConfigManager $locale_config_manager, ConfigMapperManagerInterface $config_mapper_manager, RouteProviderInterface $route_provider, TranslationInterface $translation_manager, EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager)
 
 populateFromRouteMatch (RouteMatchInterface $route_match)
 
 getEntity ()
 
 getTitle ()
 
 getBaseRouteParameters ()
 
 setType ($entity_type)
 
 getType ()
 
 getTypeName ()
 
 getTypeLabel ()
 
 getOperations ()
 
 getContextualLinkGroup ()
 
 getOverviewRouteName ()
 
- Public Member Functions inherited from ConfigNamesMapper
 __construct ($plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config, LocaleConfigManager $locale_config_manager, ConfigMapperManagerInterface $config_mapper_manager, RouteProviderInterface $route_provider, TranslationInterface $string_translation, LanguageManagerInterface $language_manager)
 
 setRouteCollection (RouteCollection $collection)
 
 getTitle ()
 
 getBaseRouteName ()
 
 getBaseRouteParameters ()
 
 getBaseRoute ()
 
 getBasePath ()
 
 getOverviewRouteName ()
 
 getOverviewRouteParameters ()
 
 getOverviewRoute ()
 
 getOverviewPath ()
 
 getAddRouteName ()
 
 getAddRouteParameters ()
 
 getAddRoute ()
 
 getEditRouteName ()
 
 getEditRouteParameters ()
 
 getEditRoute ()
 
 getDeleteRouteName ()
 
 getDeleteRouteParameters ()
 
 getDeleteRoute ()
 
 getConfigNames ()
 
 addConfigName ($name)
 
 getWeight ()
 
 populateFromRouteMatch (RouteMatchInterface $route_match)
 
 getTypeLabel ()
 
 getLangcode ()
 
 setLangcode ($langcode)
 
 getConfigData ()
 
 hasSchema ()
 
 hasTranslatable ()
 
 hasTranslation (LanguageInterface $language)
 
 getTypeName ()
 
 getOperations ()
 
 getContextualLinkGroup ()
 

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 
- Static Public Member Functions inherited from ConfigNamesMapper
static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 

Protected Member Functions

 processRoute (Route $route)
 
- Protected Member Functions inherited from ConfigNamesMapper
 processRoute (Route $route)
 

Protected Attributes

 $entityManager
 
 $entityType
 
 $entity
 
 $typeLabel
 
- Protected Attributes inherited from ConfigNamesMapper
 $configFactory
 
 $typedConfigManager
 
 $localeConfigManager
 
 $configMapperManager
 
 $routeProvider
 
 $baseRoute
 
 $routeCollection
 
 $langcode = NULL
 
 $languageManager
 

Detailed Description

Configuration mapper for configuration entities.

Constructor & Destructor Documentation

__construct (   $plugin_id,
  $plugin_definition,
ConfigFactoryInterface  $config_factory,
TypedConfigManagerInterface  $typed_config,
LocaleConfigManager  $locale_config_manager,
ConfigMapperManagerInterface  $config_mapper_manager,
RouteProviderInterface  $route_provider,
TranslationInterface  $translation_manager,
EntityManagerInterface  $entity_manager,
LanguageManagerInterface  $language_manager 
)

Constructs a ConfigEntityMapper.

Parameters
string$plugin_idThe config mapper plugin ID.
mixed$plugin_definitionAn array of plugin information as documented in ConfigNamesMapper::__construct() with the following additional keys:
  • entity_type: The name of the entity type this mapper belongs to.
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe configuration factory.
\Drupal\Core\Config\TypedConfigManagerInterface$typed_configThe typed configuration manager.
\Drupal\locale\LocaleConfigManager$locale_config_managerThe locale configuration manager.
\Drupal\config_translation\ConfigMapperManagerInterface$config_mapper_managerThe mapper plugin discovery service.
\Drupal\Core\Routing\RouteProviderInterface$route_providerThe route provider.
\Drupal\Core\StringTranslation\TranslationInterface$translation_managerThe string translation manager.
\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager.
\Drupal\Core\Language\LanguageManagerInterface$language_managerThe language manager.

References Drupal\entityManager(), and ConfigEntityMapper\setType().

Here is the call graph for this function:

Member Function Documentation

static create ( ContainerInterface  $container,
array  $configuration,
  $plugin_id,
  $plugin_definition 
)
static

{Creates an instance of the plugin.

Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$containerThe container to pull out services used in the plugin.
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin ID for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
Returns
static Returns an instance of this plugin.
}

Implements ContainerFactoryPluginInterface.

getBaseRouteParameters ( )

{Returns the route parameters for the base route the mapper is attached to.

Returns
array
}

Implements ConfigMapperInterface.

getContextualLinkGroup ( )

{Returns the name of the contextual link group to add contextual links to.

Returns
string|null A contextual link group name or null if no link should be added.
}

Implements ConfigMapperInterface.

getEntity ( )

Gets the entity instance for this mapper.

Returns
$entity The configuration entity.
getOperations ( )

{Provides an array of information to build a list of operation links.

Returns
array An associative array of operation link data for this list, keyed by operation name, containing the following key-value pairs:
  • title: The localized title of the operation.
  • href: The path for the operation.
  • options: An array of URL options for the path.
  • weight: The weight of this operation.
}

Implements ConfigMapperInterface.

References Url\fromRoute(), and t().

Here is the call graph for this function:

getOverviewRouteName ( )

{Returns route name for the translation overview route.

Returns
string Route name for the mapper.
}

Implements ConfigMapperInterface.

getTitle ( )

{Returns title of this translation page.

Returns
string The page title.
}

Implements ConfigMapperInterface.

getType ( )

Gets the entity type from this mapper.

Returns
string
getTypeLabel ( )

{Returns the label of the type of data the mapper encapsulates.

Returns
string The label of the type of data the mapper encapsulates.
}

Implements ConfigMapperInterface.

References Drupal\entityManager().

Here is the call graph for this function:

getTypeName ( )

{Returns the name of the type of data the mapper encapsulates.

Returns
string The name of the type of data the mapper encapsulates.
}

Implements ConfigMapperInterface.

References Drupal\entityManager().

Here is the call graph for this function:

populateFromRouteMatch ( RouteMatchInterface  $route_match)

{Populate the config mapper with request data.

Todo:
Replace $request with RouteMatch https://www.drupal.org/node/2295255.
Parameters
\Drupal\Core\Routing\RouteMatchInterface$route_matchThe route match.
}

Implements ConfigMapperInterface.

References RouteMatchInterface\getParameter().

Here is the call graph for this function:

processRoute ( Route  $route)
protected

{}

setType (   $entity_type)

Set entity type for this mapper.

This should be set in initialization. A mapper that knows its type but not yet its names is still useful for router item and tab generation. The concrete entity only turns out later with actual controller invocations, when the setEntity() method is invoked before the rest of the methods are used.

Parameters
string$entity_typeThe entity type to set.
Returns
bool TRUE if the entity type was set correctly; FALSE otherwise.

Referenced by ConfigEntityMapper\__construct().

Here is the caller graph for this function:


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