diff --git a/core/modules/config_translation/css/config_translation.admin.css b/core/modules/config_translation/css/config_translation.admin.css index 66d9ef3..44db1cb 100644 --- a/core/modules/config_translation/css/config_translation.admin.css +++ b/core/modules/config_translation/css/config_translation.admin.css @@ -1,6 +1,6 @@ /** * @file - * Styles for configuration translation. + * Styles for Configuration Translation. */ /** diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Access/ConfigTranslationOverviewAccess.php b/core/modules/config_translation/lib/Drupal/config_translation/Access/ConfigTranslationOverviewAccess.php index 88a94ab..73c6ab0 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Access/ConfigTranslationOverviewAccess.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Access/ConfigTranslationOverviewAccess.php @@ -33,7 +33,7 @@ class ConfigTranslationOverviewAccess implements StaticAccessCheckInterface { protected $sourceLanguage; /** - * Constructs a ConfigNameCheck object. + * Constructs a ConfigTranslationOverviewAccess object. * * @param \Drupal\config_translation\ConfigMapperManagerInterface $config_mapper_manager * The mapper plugin discovery service. diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationController.php b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationController.php index 9867def..3eb0216 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationController.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationController.php @@ -9,8 +9,8 @@ use Drupal\config_translation\ConfigMapperManagerInterface; use Drupal\Core\Access\AccessManager; -use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\Controller\ControllerBase; +use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\Language\Language; use Drupal\Core\PathProcessor\InboundPathProcessorInterface; use Drupal\Core\Session\AccountInterface; @@ -20,7 +20,6 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\Matcher\RequestMatcherInterface; -use Symfony\Component\Routing\Route; /** * Provides page callbacks for the configuration translation interface. @@ -28,7 +27,7 @@ class ConfigTranslationController extends ControllerBase implements ContainerInjectionInterface { /** - * Configuration mapper manager. + * The configuration mapper manager. * * @var \Drupal\config_translation\ConfigMapperManagerInterface */ @@ -144,8 +143,8 @@ public function itemPage(Request $request, $plugin_id) { foreach ($languages as $language) { $langcode = $language->id; - // This is needed because e.g. - // ConfigMapperInterface::getAddRouteParameters() + // This is needed because + // ConfigMapperInterface::getAddRouteParameters(), for example, // needs to return the correct language code for each table row. $fake_request->attributes->set('langcode', $langcode); $mapper->populateFromRequest($fake_request); @@ -227,7 +226,7 @@ public function itemPage(Request $request, $plugin_id) { * Path to look up. * * @return \Symfony\Component\HttpFoundation\Request|null - * A populated request object or NULL if the patch couldn't be matched. + * A populated request object or NULL if the patch could not be matched. */ protected function getRequestForPath(Request $request, $path) { // @todo Use RequestHelper::duplicate once https://drupal.org/node/2090293 diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationFieldInstanceListController.php b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationFieldInstanceListController.php index d305988..d7ad320 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationFieldInstanceListController.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationFieldInstanceListController.php @@ -31,14 +31,14 @@ class ConfigTranslationFieldInstanceListController extends ConfigTranslationEnti /** * An array containing the base entity type's definition. * - * @var string + * @var array */ protected $baseEntityInfo = array(); /** * The bundle info for the base entity type. * - * @var string + * @var array */ protected $baseEntityBundles = array(); @@ -59,7 +59,7 @@ class ConfigTranslationFieldInstanceListController extends ConfigTranslationEnti * @param array $entity_info * An array of entity info for the entity type. * @param array $definition - * The plugin definition of the config translation mapper. + * (optional) The plugin definition of the config translation mapper. * * @return static * A new instance of the entity controller. @@ -76,7 +76,7 @@ public static function createInstance(ContainerInterface $container, $entity_typ } /** - * Constructs a new EntityListController object. + * Constructs a new ConfigTranslationFieldInstanceListController object. * * @param string $entity_type * The type of entity to be listed. @@ -88,7 +88,7 @@ public static function createInstance(ContainerInterface $container, $entity_typ * The module handler to invoke hooks on. * @param \Drupal\Core\Entity\EntityManager $entity_manager * The entity manager. - * @param $definition + * @param array $definition * The plugin definition of the config translation mapper. */ public function __construct($entity_type, array $entity_info, EntityStorageControllerInterface $storage, ModuleHandlerInterface $module_handler, EntityManager $entity_manager, array $definition) { diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationListController.php b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationListController.php index c920a43..48ecad7 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationListController.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationListController.php @@ -19,7 +19,7 @@ class ConfigTranslationListController extends ControllerBase implements ContainerInjectionInterface { /** - * Definition of the config mapper. + * The definition of the config mapper. * * @var array */ @@ -37,7 +37,7 @@ class ConfigTranslationListController extends ControllerBase implements Containe * * @param \Drupal\config_translation\ConfigMapperManagerInterface $mapper_manager * The config mapper manager. - * @param $config_translation_mapper + * @param string $config_translation_mapper * The config mapper id. */ public function __construct(ConfigMapperManagerInterface $mapper_manager, $config_translation_mapper) { diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationMapperList.php b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationMapperList.php index c1ef9e5..b2242fd 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationMapperList.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Controller/ConfigTranslationMapperList.php @@ -28,7 +28,7 @@ class ConfigTranslationMapperList extends ControllerBase implements ContainerInj protected $mappers; /** - * Constructs a new ConfigTranslationMapperIndex object. + * Constructs a new ConfigTranslationMapperList object. * * @param \Drupal\config_translation\ConfigMapperInterface[] $mappers * The configuration mapper manager. @@ -38,7 +38,7 @@ public function __construct(array $mappers) { } /** - * {inheritdoc} + * {@inheritdoc} */ public static function create(ContainerInterface $container) { return new static( diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php index ada6cfa..01304ae 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php @@ -7,13 +7,11 @@ namespace Drupal\config_translation\Form; -use Drupal\config_translation\ConfigMapperInterface; use Drupal\config_translation\ConfigMapperManagerInterface; use Drupal\Core\Cache\Cache; use Drupal\Core\Config\StorageInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Form\ConfirmFormBase; -use Drupal\Core\Language\Language; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationEditForm.php b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationEditForm.php index f6457a9..a87720c 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationEditForm.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationEditForm.php @@ -40,4 +40,5 @@ public function submitForm(array &$form, array &$form_state) { parent::submitForm($form, $form_state); drupal_set_message($this->t('Successfully updated @language translation.', array('@language' => $this->language->name))); } + } diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationFormBase.php b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationFormBase.php index 48a1000..e559ea1 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationFormBase.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationFormBase.php @@ -7,7 +7,6 @@ namespace Drupal\config_translation\Form; -use Drupal\config_translation\ConfigMapperInterface; use Drupal\config_translation\ConfigMapperManagerInterface; use Drupal\Core\Config\Config; use Drupal\Core\Config\Schema\Element; @@ -41,7 +40,7 @@ protected $configMapperManager; /** - * String translation storage object. + * The string translation storage object. * * @var \Drupal\locale\StringStorageInterface */ @@ -114,7 +113,7 @@ public static function create(ContainerInterface $container) { } /** - * {@inheritdoc}. + * {@inheritdoc} */ public function getBaseFormID() { return 'config_translation_form'; @@ -131,11 +130,12 @@ public function getBaseFormID() { * @param array $form_state * An associative array containing the current state of the form. * @param \Symfony\Component\HttpFoundation\Request $request - * Page request object. + * (optional) Page request object. * @param string $plugin_id - * The plugin ID of the mapper. + * (optional) The plugin ID of the mapper. * @param string $langcode - * The language code of the language the form is adding or editing. + * (optional) The language code of the language the form is adding or + * editing. * * @return array * The form structure. @@ -359,8 +359,8 @@ protected function buildConfigForm(Element $schema, $config_data, $base_config_d * Either format is used, the nested arrays are just containers and not * needed for saving the data. * @param bool $shipped_config - * Flag to specify whether the configuration had a shipped version and - * therefore should also be stored in the locale database. + * (optional) Flag to specify whether the configuration had a shipped + * version and therefore should also be stored in the locale database. */ protected function setConfig(Language $language, Config $base_config, Config $translation_config, array $config_values, $shipped_config = FALSE) { foreach ($config_values as $key => $value) { diff --git a/core/modules/config_translation/lib/Drupal/config_translation/FormElement/Element.php b/core/modules/config_translation/lib/Drupal/config_translation/FormElement/Element.php index 3c55c6d..40a43c2 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/FormElement/Element.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/FormElement/Element.php @@ -8,7 +8,7 @@ namespace Drupal\config_translation\FormElement; /** - * Base class for form elements. + * Defines a base class for form elements. */ abstract class Element implements ElementInterface { diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Plugin/Derivative/ConfigTranslationContextualLinks.php b/core/modules/config_translation/lib/Drupal/config_translation/Plugin/Derivative/ConfigTranslationContextualLinks.php index 0d6a3a9..0fac412 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Plugin/Derivative/ConfigTranslationContextualLinks.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Plugin/Derivative/ConfigTranslationContextualLinks.php @@ -11,7 +11,6 @@ use Drupal\Component\Plugin\Derivative\DerivativeBase; use Drupal\config_translation\ConfigMapperManagerInterface; use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface; -use Drupal\Core\Routing\RouteProviderInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Plugin/Derivative/ConfigTranslationLocalTasks.php b/core/modules/config_translation/lib/Drupal/config_translation/Plugin/Derivative/ConfigTranslationLocalTasks.php index a662fa7..7ee6e6e 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Plugin/Derivative/ConfigTranslationLocalTasks.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Plugin/Derivative/ConfigTranslationLocalTasks.php @@ -26,7 +26,7 @@ class ConfigTranslationLocalTasks extends DerivativeBase implements ContainerDer protected $mapperManager; /** - * The base plugin ID + * The base plugin ID. * * @var string */ @@ -101,7 +101,7 @@ public function alterLocalTasks(array &$local_tasks) { * @return bool|string * Returns the local task ID of the parent task, otherwise return FALSE. */ - protected function getTaskFromRoute($route_name, &$local_tasks) { + protected function getTaskFromRoute($route_name, array &$local_tasks) { $root_local_task = FALSE; foreach ($local_tasks as $plugin_id => $local_task) { if ($local_task['route_name'] == $route_name) {