objectWrapper = $pageWrapper; } public function getQuery(): QueryBuilder { $qb = sqlQueryBuilder()->select('ml.*') ->from('menu_links', 'ml') ->where(Operator::equals(['ml.type' => MenuUtil::TYPE_PAGE])) ->andWhere(Translation::coalesceTranslatedFields(MenuLinksTranslation::class)) ->orderBy('ml.parent, ml.list_order'); foreach ($this->specs as $spec) { $qb->andWhere($spec); } $this->query = $qb; return $qb; } public function filterByObjectID($objectID): void { $this->specs[] = Operator::equals(['ml.id' => $objectID]); } public static function isAllowed(): bool { return true; } }