Skip to content
Snippets Groups Projects
Commit 72ae69d3 authored by catch's avatar catch
Browse files

Issue #2600078 by YesCT, koppie, kgoel: Correct syntax for data type...

Issue #2600078 by YesCT, koppie, kgoel: Correct syntax for data type documentation in TranslationManager.php
parent 04df0c65
No related branches found
No related tags found
No related merge requests found
......@@ -16,20 +16,24 @@
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 @@ public function __construct(LanguageDefault $default_language) {
* @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 @@ public function addTranslator(TranslatorInterface $translator, $priority = 0) {
/**
* 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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment