interface ConfigEntityMapperInterface

Same name in other branches
  1. 10 core/modules/config_translation/src/ConfigEntityMapperInterface.php \Drupal\config_translation\ConfigEntityMapperInterface

Defines an interface for configuration entity mappers.

Hierarchy

Expanded class hierarchy of ConfigEntityMapperInterface

All classes that implement ConfigEntityMapperInterface

1 file declares its use of ConfigEntityMapperInterface
EditorConfigTranslationSubscriber.php in core/modules/editor/src/EventSubscriber/EditorConfigTranslationSubscriber.php

File

core/modules/config_translation/src/ConfigEntityMapperInterface.php, line 10

Namespace

Drupal\config_translation
View source
interface ConfigEntityMapperInterface extends ConfigMapperInterface {
    
    /**
     * Gets the entity instance for this mapper.
     *
     * @return \Drupal\Core\Config\Entity\ConfigEntityInterface
     *   The configuration entity.
     */
    public function getEntity();
    
    /**
     * Sets the entity instance for this mapper.
     *
     * This method can only be invoked when the concrete entity is known, that is
     * in a request for an entity translation path. After this method is called,
     * the mapper is fully populated with the proper display title and
     * configuration names to use to check permissions or display a translation
     * screen.
     *
     * @param \Drupal\Core\Config\Entity\ConfigEntityInterface $entity
     *   The configuration entity to set.
     *
     * @return bool
     *   TRUE, if the entity was set successfully; FALSE otherwise.
     */
    public function setEntity(ConfigEntityInterface $entity);
    
    /**
     * 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.
     *
     * @param string $entity_type_id
     *   The entity type ID to set.
     *
     * @return bool
     *   TRUE if the entity type ID was set correctly; FALSE otherwise.
     */
    public function setType(string $entity_type_id) : bool;
    
    /**
     * Gets the entity type ID from this mapper.
     *
     * @return string
     *   The entity type ID.
     */
    public function getType() : string;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
ConfigEntityMapperInterface::getEntity public function Gets the entity instance for this mapper. 1
ConfigEntityMapperInterface::getType public function Gets the entity type ID from this mapper. 1
ConfigEntityMapperInterface::setEntity public function Sets the entity instance for this mapper. 1
ConfigEntityMapperInterface::setType public function Set entity type for this mapper. 1
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.