Same filename and directory in other branches
- 8.9.x core/modules/locale/src/StreamWrapper/TranslationsStream.php
- 9 core/modules/locale/src/StreamWrapper/TranslationsStream.php
Namespace
Drupal\locale\StreamWrapper
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.');
}
}
Classes