diff --git a/core/lib/Thelia/Core/Event/ActionEventClass.php b/core/lib/Thelia/Core/Event/ActionEventClass.php deleted file mode 100644 index d09cdefb4..000000000 --- a/core/lib/Thelia/Core/Event/ActionEventClass.php +++ /dev/null @@ -1,53 +0,0 @@ -. */ -/* */ -/*************************************************************************************/ - -namespace Thelia\Core\Event; - - -use Symfony\Component\EventDispatcher\Event; - -class ActionEventClass extends Event -{ - protected $className; - protected $action; - - public function __construct($action) - { - $this->action = $action; - } - - public function setClassName($className) - { - $this->className = $className; - } - - public function hasClassName() - { - return $this->className !== null; - } - - public function getClassName() - { - return $this->className; - } -} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Factory/ActionEventFactory.php b/core/lib/Thelia/Core/Factory/ActionEventFactory.php index 0e1186e7f..e2ac7d016 100644 --- a/core/lib/Thelia/Core/Factory/ActionEventFactory.php +++ b/core/lib/Thelia/Core/Factory/ActionEventFactory.php @@ -34,6 +34,11 @@ class ActionEventFactory protected $action; protected $dispatcher; + /** + * @todo : delegate to config for creating associating value + * + * @var array + */ protected $className = array( "addArticle" => "Thelia\Core\Event\CartEvent", "deleteArticle" => "Thelia\Core\Event\CartEvent", @@ -57,15 +62,6 @@ class ActionEventFactory // return $class->newInstance($this->request, $this->action); } else { - $actionEventClass = new ActionEventClass($this->action); - $this->dispatcher->dispatch("action.searchClass", $actionEventClass); - - if ($actionEventClass->hasClassName()) { - $class = new \ReflectionClass($actionEventClass->getClassName()); - } - } - - if (is_null($class)) { $class = new \ReflectionClass($this->defaultClassName); }