TranslationsStream.php in Zircon Profile 8
File
core/modules/locale/src/StreamWrapper/TranslationsStream.php
View source
<?php
namespace Drupal\locale\StreamWrapper;
use Drupal\Core\Annotation\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');
}
function getDirectoryPath() {
return \Drupal::config('locale.settings')
->get('translation.path');
}
function getExternalUrl() {
throw new \LogicException('PO files URL should not be public.');
}
}