Merge branch 'master' of https://github.com/thelia/thelia into coupon

* 'master' of https://github.com/thelia/thelia: (121 commits)
  set cartItem in cart add and update events
  need to unescape breadcrumb strings after been in array
  update readme file
  update insert.sql with new release version
  change changelog file format
  Prevent product and content création at catalog root
  dynamic delivery modules on delivery front template
  complete changelog
  Finished merging modules with master
  Revert "Merge branch 'cleanmaster' into modules"
  use TaxEngine::getDeliveryCountry in delivery loop
  refacto getTaxCountry which is actually getDeliveryCountry
  make it magic last stand
  change loop in shipping zone template using module insteadof delivery
  Fixed template loop
  Refactored templates processing
  complete readme file
  change email address of core contributors
  fix getPosition folder test
  add coupon tests
  ...

Conflicts:
	core/lib/Thelia/Controller/Admin/ProductController.php
This commit is contained in:
gmorel
2013-12-25 14:14:20 +01:00
199 changed files with 7036 additions and 2625 deletions

View File

@@ -29,8 +29,7 @@ use Thelia\Core\Event\Folder\FolderToggleVisibilityEvent;
use Thelia\Core\Event\Folder\FolderUpdateEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Event\UpdatePositionEvent;
use Thelia\Exception\UrlRewritingException;
use Thelia\Form\Exception\FormValidationException;
use Thelia\Core\Event\UpdateSeoEvent;
use Thelia\Model\FolderQuery;
use Thelia\Model\Folder as FolderModel;
@@ -58,17 +57,22 @@ class Folder extends BaseAction implements EventSubscriberInterface
->save();
;
// Update the rewritten URL, if required
try {
$folder->setRewrittenUrl($event->getLocale(), $event->getUrl());
} catch(UrlRewritingException $e) {
throw new FormValidationException($e->getMessage(), $e->getCode());
}
$event->setFolder($folder);
}
}
/**
* Change Folder SEO
*
* @param \Thelia\Core\Event\UpdateSeoEvent $event
*
* @return mixed
*/
public function updateSeo(UpdateSeoEvent $event)
{
return $this->genericUpdateSeo(FolderQuery::create(), $event);
}
public function delete(FolderDeleteEvent $event)
{
if (null !== $folder = FolderQuery::create()->findPk($event->getFolderId())) {
@@ -158,6 +162,7 @@ class Folder extends BaseAction implements EventSubscriberInterface
TheliaEvents::FOLDER_TOGGLE_VISIBILITY => array("toggleVisibility", 128),
TheliaEvents::FOLDER_UPDATE_POSITION => array("updatePosition", 128),
TheliaEvents::FOLDER_UPDATE_SEO => array('updateSeo', 128)
);
}
}