Issue #2600078 by YesCT, koppie, kgoel: Correct syntax for data type documentation in TranslationManager.php

8.1.x
Nathaniel Catchpole 2015-11-25 14:53:05 +00:00
parent 04df0c659d
commit 72ae69d3c7
1 changed files with 13 additions and 10 deletions

View File

@ -16,20 +16,24 @@ use Drupal\Core\StringTranslation\Translator\TranslatorInterface;
class TranslationManager implements TranslationInterface, TranslatorInterface {
/**
* An array of active translators keyed by priority.
* An unsorted array of arrays of active translators.
*
* @var array
* Array of \Drupal\Core\StringTranslation\Translator\TranslatorInterface objects
* An associative array. The keys are integers that indicate priority. Values
* are arrays of TranslatorInterface objects.
*
* @var \Drupal\Core\StringTranslation\Translator\TranslatorInterface[][]
*
* @see \Drupal\Core\StringTranslation\TranslationManager::addTranslator()
* @see \Drupal\Core\StringTranslation\TranslationManager::sortTranslators()
*/
protected $translators = array();
/**
* Holds the array of translators sorted by priority.
* An array of translators, sorted by priority.
*
* If this is NULL a rebuild will be triggered.
*
* @var array
* An array of path processor objects.
* @var null|\Drupal\Core\StringTranslation\Translator\TranslatorInterface[]
*
* @see \Drupal\Core\StringTranslation\TranslationManager::addTranslator()
* @see \Drupal\Core\StringTranslation\TranslationManager::sortTranslators()
@ -62,8 +66,7 @@ class TranslationManager implements TranslationInterface, TranslatorInterface {
* @param int $priority
* The priority of the logger being added.
*
* @return \Drupal\Core\StringTranslation\TranslationManager
* The called object.
* @return $this
*/
public function addTranslator(TranslatorInterface $translator, $priority = 0) {
$this->translators[$priority][] = $translator;
@ -75,8 +78,8 @@ class TranslationManager implements TranslationInterface, TranslatorInterface {
/**
* Sorts translators according to priority.
*
* @return array
* A sorted array of translators objects.
* @return \Drupal\Core\StringTranslation\Translator\TranslatorInterface[]
* A sorted array of translator objects.
*/
protected function sortTranslators() {
$sorted = array();