Bonjour,
Je souhaite créer un plugin Smarty. J'ai crée l'arborescence suivante:
http://imgur.com/NPJLLDA
Contenu du fichier config.xml
<services>
<service id="smarty.plugin.niceurl" class="Tools\Smarty\Plugin\Niceurl">
<tag name="thelia.parser.register_plugin"/>
</service>
</services>
Contenu (partiel) du fichier Tools/Smarty/Plugin
namespace Tools\Smarty\Plugin;
use Thelia\Core\Template\Smarty\SmartyPluginDescriptor;
use Thelia\Core\Template\Smarty\AbstractSmartyPlugin;
/**
* Class NiceUrl
*/
class NiceUrl extends AbstractSmartyPlugin
{
Contenu du fichier Tools/Tools.php
namespace Tools;
use Propel\Runtime\Connection\ConnectionInterface;
use Thelia\Install\Database;
use Thelia\Module\BaseModule;
class Tools extends BaseModule
{
/*
* Install the om_news table
*
A l'activation du plugin j'obtiens le message d'erreur suivant:
FatalErrorException: Error: Class 'Tools\Smarty\Plugin\Niceurl' not found in /var/vhosts/scoot-company/cache/dev/CoreDevDebugProjectContainer.php line 1099
Mon Thelia est sous Debian 6.0.10, PHP 5.4.33