mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°2435.1 Portal: Split portal composer.json in 2
- Autoloader for portal files in the itop-portal-base module - Dependencies moved to root composer.json - Add autoloader for /core and /application content
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper\Fixtures;
|
||||
|
||||
use Symfony\Component\Templating\TemplateNameParserInterface;
|
||||
use Symfony\Component\Templating\TemplateReference;
|
||||
|
||||
class StubTemplateNameParser implements TemplateNameParserInterface
|
||||
{
|
||||
private $root;
|
||||
|
||||
private $rootTheme;
|
||||
|
||||
public function __construct($root, $rootTheme)
|
||||
{
|
||||
$this->root = $root;
|
||||
$this->rootTheme = $rootTheme;
|
||||
}
|
||||
|
||||
public function parse($name)
|
||||
{
|
||||
list($bundle, $controller, $template) = explode(':', $name, 3);
|
||||
|
||||
if ('_' == $template[0]) {
|
||||
$path = $this->rootTheme.'/Custom/'.$template;
|
||||
} elseif ('TestBundle' === $bundle) {
|
||||
$path = $this->rootTheme.'/'.$controller.'/'.$template;
|
||||
} else {
|
||||
$path = $this->root.'/'.$controller.'/'.$template;
|
||||
}
|
||||
|
||||
return new TemplateReference($path, 'php');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user