query = $query; } public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { $query->orderBy('id'); return $query; } public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { if($this->section) { $query->filterBySection($this->section); } $query->filterIsOnlineAndOffline(); return $query; } public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { return $query; } public function getByProductFamily(ProductFamilyInterface $productFamily, $query = null) { $query = $this->createDefaultQuery($query); $query ->filterProductFamily($productFamily); return $query->findOne(); } }