translation/ConfigMapperInterface.php
<?php
/**
* @file
* Contains \Drupal\config_translation\ConfigMapperInterface.
*/
namespace Drupal\config_translation;
use Drupal\Core\Language\Language;
use Symfony\Component\HttpFoundation\Request;
/**
* Defines an interface for configuration mapper.
*/
interface ConfigMapperInterface {
/**
* Returns title of this translation page.
*
* @return string
* The page title.
*/
public
/**
* 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
/**
* 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
/**
* Returns route name for the mapper.
*
* @return string
* Route name for the mapper.
*/
public
/**
* Returns the route parameters for the translation route.
*
* @return array
*/
public
/**
* Returns the route object for a translation page.
*
* @return \Symfony\Component\Routing\Route
* The route object for the translation page.
*/
public
/**
* Returns a processed path for the base page.
*
* @return string
* Processed path with placeholders replaced.
*/
public
/**
* Returns an array of configuration names for the mapper.
*
* @return array
* An array of configuration names for the mapper.
*/
public
/**
* Adds the given configuration name to the list of names.
*
* @param string $name
* Configuration name.
*/
public
/**
* Returns the weight of the mapper.
*
* @return int
* The weight of the mapper.
*/
public
/**
* Returns an array with all configuration data.
*
* @return array
* Configuration data keyed by configuration names.
*/
public
/**
* 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
/**
* Returns language object for the configuration.
*
* If the language of the configuration files is not a configured language on
* the site and it is English, we return a dummy language object to represent
* the built-in language.
*
* @return \Drupal\Core\Language\Language
* A configured language object instance or a dummy English language object.
*
* @throws \RuntimeException
* Throws an exception if the language codes in the config files don't
* match.
*/
public
/**
* Returns the name of the type of data the mapper encapsulates.
*
* @return string
* The name of the type of data the mapper encapsulates.
*/
public
/**
* 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
/**
* Returns the label of the type of data the mapper encapsulates.
*
* @return string
* The label of the type of data the mapper encapsulates.
*/
public
/**
* Checks that all pieces of this configuration mapper have a schema.
*
* @return bool
* TRUE if all of the elements have schema, FALSE otherwise.
*/
public
/**
* Checks that all pieces of this configuration mapper have translatables.
*
* @return bool
* TRUE if all of the configuration elements have translatables, FALSE
* otherwise.
*/
public
/**
* Checks whether there is already a translation for this mapper.
*
* @param \Drupal\Core\Language\Language $language
* A language object.
*
* @return bool
* TRUE if any of the configuration elements have a translation in the
* given language, FALSE otherwise.
*/
public Language $language);
/**
* Populate the config mapper with request data.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* Page request object.
*/
public Request $request);
/**
* 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
}