Merge pull request #332 from bilhackmac/master
Load modules by position
This commit is contained in:
@@ -27,7 +27,7 @@ class BaseAction
|
||||
* @param ModelCriteria $query
|
||||
* @param UpdatePositionEvent $event
|
||||
*
|
||||
* @return mixed
|
||||
* @return null
|
||||
*/
|
||||
protected function genericUpdatePosition(ModelCriteria $query, UpdatePositionEvent $event)
|
||||
{
|
||||
|
||||
@@ -180,6 +180,8 @@ class Module extends BaseAction implements EventSubscriberInterface
|
||||
public function updatePosition(UpdatePositionEvent $event)
|
||||
{
|
||||
$this->genericUpdatePosition(ModuleQuery::create(), $event);
|
||||
|
||||
$this->cacheClear($event->getDispatcher());
|
||||
}
|
||||
|
||||
protected function cacheClear(EventDispatcherInterface $dispatcher)
|
||||
|
||||
@@ -25,6 +25,7 @@ class ModuleQuery extends BaseModuleQuery
|
||||
if (null === self::$activated) {
|
||||
self::$activated = self::create()
|
||||
->filterByActivate(1)
|
||||
->orderByPosition()
|
||||
->find();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user