public function __construct(StickyRequest $req = null) { $u = new \User(); if ($u->isSuperUser()) { $this->ignorePermissions(); } parent::__construct($req); }
public function __construct(Entity $entity) { $this->category = $entity->getAttributeKeyCategory(); $this->entity = $entity; parent::__construct(null); if ($entity->supportsCustomDisplayOrder()) { $this->setItemsPerPage(-1); $this->sortByDisplayOrderAscending(); } }