protected function initFiles()
{
if (!empty(self::$files[static::EXTENSION]) || !in_array(static::EXTENSION, $this->module->patterns)) {
return;
}
self::$files[static::EXTENSION] = [];
foreach ($this->_getRoots() as $root) {
$root = realpath($root);
Yii::trace("Scanning " . static::EXTENSION . " files for language elements in: {$root}", 'translatemanager');
$files = FileHelper::findFiles($root, ['except' => $this->module->ignoredItems, 'only' => [static::EXTENSION]]);
self::$files[static::EXTENSION] = array_merge(self::$files[static::EXTENSION], $files);
}
self::$files[static::EXTENSION] = array_unique(self::$files[static::EXTENSION]);
}