TranslationsStream.php in Drupal 8
File
core/modules/locale/src/StreamWrapper/TranslationsStream.php
View source
<?php
namespace Drupal\locale\StreamWrapper;
use Drupal\Core\StreamWrapper\LocalStream;
use Drupal\Core\StreamWrapper\StreamWrapperInterface;
class TranslationsStream extends LocalStream {
public static function getType() {
return StreamWrapperInterface::LOCAL_HIDDEN;
}
public function getName() {
return t('Translation files');
}
public function getDescription() {
return t('Translation files');
}
public function getDirectoryPath() {
return \Drupal::config('locale.settings')
->get('translation.path');
}
public function getExternalUrl() {
throw new \LogicException('PO files URL should not be public.');
}
}