public function TranslationsDataCollector::collect in Devel 8
Same name and namespace in other branches
- 8.3 webprofiler/src/DataCollector/TranslationsDataCollector.php \Drupal\webprofiler\DataCollector\TranslationsDataCollector::collect()
- 8.2 webprofiler/src/DataCollector/TranslationsDataCollector.php \Drupal\webprofiler\DataCollector\TranslationsDataCollector::collect()
- 4.x webprofiler/src/DataCollector/TranslationsDataCollector.php \Drupal\webprofiler\DataCollector\TranslationsDataCollector::collect()
File
- webprofiler/
src/ DataCollector/ TranslationsDataCollector.php, line 46
Class
- TranslationsDataCollector
- Class TranslationsDataCollector
Namespace
Drupal\webprofiler\DataCollectorCode
public function collect(Request $request, Response $response, \Exception $exception = NULL) {
if ($this->translation instanceof TranslationManagerWrapper) {
/** \Drupal\webprofiler\StringTranslation\TranslationManagerWrapper $this->translation */
$this->data['translations']['translated'] = $this->translation
->getTranslated();
$this->data['translations']['untranslated'] = $this->translation
->getUntranslated();
}
$this->data['user_interface_translations_path'] = $this->urlGenerator
->generateFromRoute('locale.translate_page');
}