Revert "Merge branch 'cleanmaster' into modules"

This reverts commit d0ff5260f7, reversing
changes made to 67d0101dbe.
This commit is contained in:
Etienne Roudeix
2013-12-20 11:16:42 +01:00
parent d0ff5260f7
commit b3ac365b45
332 changed files with 3575 additions and 4787 deletions

View File

@@ -39,6 +39,7 @@ use Thelia\Model\Module;
use Thelia\Model\ModuleImage;
use Thelia\Model\ModuleQuery;
class BaseModule extends ContainerAware implements BaseModuleInterface
{
const CLASSIC_MODULE_TYPE = 1;
@@ -114,18 +115,16 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
return $this->container;
}
public function hasRequest()
{
public function hasRequest() {
return null !== $this->request;
}
public function setRequest(Request $request)
{
public function setRequest(Request $request) {
$this->request = $request;
}
public function getRequest()
{
public function getRequest() {
if ($this->hasRequest() === false) {
throw new \RuntimeException("Sorry, the request is not available in this context");
}
@@ -133,18 +132,16 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
return $this->request;
}
public function hasDispatcher()
{
public function hasDispatcher() {
return null !== $this->dispatcher;
}
public function setDispatcher(EventDispatcherInterface $dispatcher)
{
public function setDispatcher(EventDispatcherInterface $dispatcher) {
$this->dispatcher = $dispatcher;
}
public function getDispatcher()
{
public function getDispatcher() {
if ($this->hasDispatcher() === false) {
throw new \RuntimeException("Sorry, the dispatcher is not available in this context");
}
@@ -152,6 +149,7 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
return $this->dispatcher;
}
public function setTitle(Module $module, $titles)
{
if (is_array($titles)) {
@@ -291,4 +289,4 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
{
// Implement this method to do something useful.
}
}
}

View File

@@ -24,6 +24,8 @@
namespace Thelia\Module;
use Propel\Runtime\Connection\ConnectionInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
interface BaseModuleInterface
{