interface ConfigMapperInterface
Same name in other branches
- 9 core/modules/config_translation/src/ConfigMapperInterface.php \Drupal\config_translation\ConfigMapperInterface
- 8.9.x core/modules/config_translation/src/ConfigMapperInterface.php \Drupal\config_translation\ConfigMapperInterface
- 11.x core/modules/config_translation/src/ConfigMapperInterface.php \Drupal\config_translation\ConfigMapperInterface
Defines an interface for configuration mapper.
Hierarchy
- interface \Drupal\config_translation\ConfigMapperInterface
Expanded class hierarchy of ConfigMapperInterface
All classes that implement ConfigMapperInterface
4 files declare their use of ConfigMapperInterface
- ConfigMapperPopulateEvent.php in core/
modules/ config_translation/ src/ Event/ ConfigMapperPopulateEvent.php - ConfigTranslationFormAccess.php in core/
modules/ config_translation/ src/ Access/ ConfigTranslationFormAccess.php - ConfigTranslationMapperList.php in core/
modules/ config_translation/ src/ Controller/ ConfigTranslationMapperList.php - ConfigTranslationOverviewAccess.php in core/
modules/ config_translation/ src/ Access/ ConfigTranslationOverviewAccess.php
File
-
core/
modules/ config_translation/ src/ ConfigMapperInterface.php, line 12
Namespace
Drupal\config_translationView source
interface ConfigMapperInterface {
/**
* Returns title of this translation page.
*
* @return string
* The page title.
*/
public function getTitle();
/**
* Sets the route collection.
*
* @param \Symfony\Component\Routing\RouteCollection $collection
* The route collection.
*/
public function setRouteCollection(RouteCollection $collection);
/**
* Returns the name of the base route the mapper is attached to.
*
* @return string
* The name of the base route the mapper is attached to.
*/
public function getBaseRouteName();
/**
* Returns the route parameters for the base route the mapper is attached to.
*
* @return array
*/
public function getBaseRouteParameters();
/**
* Returns the base route object the mapper is attached to.
*
* @return \Symfony\Component\Routing\Route
* The base route object the mapper is attached to.
*/
public function getBaseRoute();
/**
* Returns a processed path for the base route the mapper is attached to.
*
* @return string
* Processed path with placeholders replaced.
*/
public function getBasePath();
/**
* Returns route name for the translation overview route.
*
* @return string
* Route name for the mapper.
*/
public function getOverviewRouteName();
/**
* Returns the route parameters for the translation overview route.
*
* @return array
*/
public function getOverviewRouteParameters();
/**
* Returns the route object for a translation overview route.
*
* @return \Symfony\Component\Routing\Route
* The route object for the translation page.
*/
public function getOverviewRoute();
/**
* Returns a processed path for the translation overview route.
*
* @return string
* Processed path with placeholders replaced.
*/
public function getOverviewPath();
/**
* Returns route name for the translation add form route.
*
* @return string
* Route name for the mapper.
*/
public function getAddRouteName();
/**
* Returns the route parameters for the translation add form route.
*
* @return array
*/
public function getAddRouteParameters();
/**
* Returns the route object for a translation add form route.
*
* @return \Symfony\Component\Routing\Route
* The route object for the translation page.
*/
public function getAddRoute();
/**
* Returns route name for the translation edit form route.
*
* @return string
* Route name for the mapper.
*/
public function getEditRouteName();
/**
* Returns the route parameters for the translation edit form route.
*
* @return array
*/
public function getEditRouteParameters();
/**
* Returns the route object for a translation edit form route.
*
* @return \Symfony\Component\Routing\Route
* The route object for the translation page.
*/
public function getEditRoute();
/**
* Returns route name for the translation deletion route.
*
* @return string
* Route name for the mapper.
*/
public function getDeleteRouteName();
/**
* Returns the route parameters for the translation deletion route.
*
* @return array
*/
public function getDeleteRouteParameters();
/**
* Returns the route object for the translation deletion route.
*
* @return \Symfony\Component\Routing\Route
* The route object for the translation page.
*/
public function getDeleteRoute();
/**
* Returns an array of configuration names for the mapper.
*
* @return array
* An array of configuration names for the mapper.
*/
public function getConfigNames();
/**
* Adds the given configuration name to the list of names.
*
* Note that it is the responsibility of the calling code to ensure that the
* configuration exists.
*
* @param string $name
* Configuration name.
*/
public function addConfigName($name);
/**
* Returns the weight of the mapper.
*
* @return int
* The weight of the mapper.
*/
public function getWeight();
/**
* Returns an array with all configuration data.
*
* @return array
* Configuration data keyed by configuration names.
*/
public function getConfigData();
/**
* Returns the original language code of the configuration.
*
* @throws \RuntimeException
* Throws an exception if the language codes in the config files don't
* match.
*/
public function getLangcode();
/**
* Returns the language code of a configuration object given its name.
*
* @param string $config_name
* The name of the configuration object.
*
* @return string
* The language code of the configuration object.
*/
public function getLangcodeFromConfig($config_name);
/**
* Sets the original language code.
*
* @param string $langcode
* The langcode.
*
* @return $this
*/
public function setLangcode($langcode);
/**
* Returns the name of the type of data the mapper encapsulates.
*
* @return string
* The name of the type of data the mapper encapsulates.
*/
public function getTypeName();
/**
* Provides an array of information to build a list of operation links.
*
* @return 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.
*/
public function getOperations();
/**
* Returns the label of the type of data the mapper encapsulates.
*
* @return string
* The label of the type of data the mapper encapsulates.
*/
public function getTypeLabel();
/**
* Checks that all pieces of this configuration mapper have a schema.
*
* @return bool
* TRUE if all of the elements have schema, FALSE otherwise.
*/
public function hasSchema();
/**
* Checks if pieces of this configuration mapper have translatables.
*
* @return bool
* TRUE if at least one of the configuration elements has translatables,
* FALSE otherwise.
*/
public function hasTranslatable();
/**
* Checks whether there is already a translation for this mapper.
*
* @param \Drupal\Core\Language\LanguageInterface $language
* A language object.
*
* @return bool
* TRUE if any of the configuration elements have a translation in the
* given language, FALSE otherwise.
*/
public function hasTranslation(LanguageInterface $language);
/**
* Populate the config mapper with route match data.
*
* @param \Drupal\Core\Routing\RouteMatchInterface $route_match
* The route match.
*
* @see \Drupal\config_translation\Event\ConfigTranslationEvents::POPULATE_MAPPER
*/
public function populateFromRouteMatch(RouteMatchInterface $route_match);
/**
* Returns the name of the contextual link group to add contextual links to.
*
* @return string|null
* A contextual link group name or null if no link should be added.
*/
public function getContextualLinkGroup();
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
ConfigMapperInterface::addConfigName | public | function | Adds the given configuration name to the list of names. | 1 |
ConfigMapperInterface::getAddRoute | public | function | Returns the route object for a translation add form route. | 1 |
ConfigMapperInterface::getAddRouteName | public | function | Returns route name for the translation add form route. | 1 |
ConfigMapperInterface::getAddRouteParameters | public | function | Returns the route parameters for the translation add form route. | 1 |
ConfigMapperInterface::getBasePath | public | function | Returns a processed path for the base route the mapper is attached to. | 1 |
ConfigMapperInterface::getBaseRoute | public | function | Returns the base route object the mapper is attached to. | 1 |
ConfigMapperInterface::getBaseRouteName | public | function | Returns the name of the base route the mapper is attached to. | 1 |
ConfigMapperInterface::getBaseRouteParameters | public | function | Returns the route parameters for the base route the mapper is attached to. | 1 |
ConfigMapperInterface::getConfigData | public | function | Returns an array with all configuration data. | 1 |
ConfigMapperInterface::getConfigNames | public | function | Returns an array of configuration names for the mapper. | 1 |
ConfigMapperInterface::getContextualLinkGroup | public | function | Returns the name of the contextual link group to add contextual links to. | 1 |
ConfigMapperInterface::getDeleteRoute | public | function | Returns the route object for the translation deletion route. | 1 |
ConfigMapperInterface::getDeleteRouteName | public | function | Returns route name for the translation deletion route. | 1 |
ConfigMapperInterface::getDeleteRouteParameters | public | function | Returns the route parameters for the translation deletion route. | 1 |
ConfigMapperInterface::getEditRoute | public | function | Returns the route object for a translation edit form route. | 1 |
ConfigMapperInterface::getEditRouteName | public | function | Returns route name for the translation edit form route. | 1 |
ConfigMapperInterface::getEditRouteParameters | public | function | Returns the route parameters for the translation edit form route. | 1 |
ConfigMapperInterface::getLangcode | public | function | Returns the original language code of the configuration. | 1 |
ConfigMapperInterface::getLangcodeFromConfig | public | function | Returns the language code of a configuration object given its name. | 1 |
ConfigMapperInterface::getOperations | public | function | Provides an array of information to build a list of operation links. | 1 |
ConfigMapperInterface::getOverviewPath | public | function | Returns a processed path for the translation overview route. | 1 |
ConfigMapperInterface::getOverviewRoute | public | function | Returns the route object for a translation overview route. | 1 |
ConfigMapperInterface::getOverviewRouteName | public | function | Returns route name for the translation overview route. | 1 |
ConfigMapperInterface::getOverviewRouteParameters | public | function | Returns the route parameters for the translation overview route. | 1 |
ConfigMapperInterface::getTitle | public | function | Returns title of this translation page. | 1 |
ConfigMapperInterface::getTypeLabel | public | function | Returns the label of the type of data the mapper encapsulates. | 1 |
ConfigMapperInterface::getTypeName | public | function | Returns the name of the type of data the mapper encapsulates. | 1 |
ConfigMapperInterface::getWeight | public | function | Returns the weight of the mapper. | 1 |
ConfigMapperInterface::hasSchema | public | function | Checks that all pieces of this configuration mapper have a schema. | 1 |
ConfigMapperInterface::hasTranslatable | public | function | Checks if pieces of this configuration mapper have translatables. | 1 |
ConfigMapperInterface::hasTranslation | public | function | Checks whether there is already a translation for this mapper. | 1 |
ConfigMapperInterface::populateFromRouteMatch | public | function | Populate the config mapper with route match data. | 1 |
ConfigMapperInterface::setLangcode | public | function | Sets the original language code. | 1 |
ConfigMapperInterface::setRouteCollection | public | function | Sets the route collection. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.