/** * Test method. * * @return void */ public function testDottedExtensionPath() { $this->assertThat(ExtensionHelper::getExtensionPath('foo.bar'), $this->equalTo('foo')); }
/** * Get the language template path. * * @param string $extension Extension name. * @param string $scope Extension scope * * @return string */ public static function getTemplatePath($extension, $scope) { static $templates = array(); if (array_key_exists($extension, $templates) && array_key_exists($scope, $templates[$extension])) { return $templates[$extension][$scope]; } $base = ExtensionHelper::getDomainPath($scope); $fileName = $extension . '.pot'; $extensionDir = ExtensionHelper::getExtensionPath($extension); return "{$base}/{$extensionDir}/" . ExtensionHelper::$langDirName . "/templates/{$fileName}"; }