query = $query; } public function orderByDefault(RepositoryQueryInterface $query) :RepositoryQueryInterface { return $query; } public function filtersDefault($query):RepositoryQueryInterface { $query->filterIsOnlineAndOffline(); $query->filterBySection($this->section); } public function relationsDefault($query):RepositoryQueryInterface { return $query->joinProductFamily(); } //findProductByAvailabilitiesNegative public function getByAvailabilitiesNegative(ProductRepositoryQuery $query = null): array { $query = $this->createDefaultQuery($query); $query->filterIsOnline(); $query->filterBehaviorCountStock(); $query->groupBy('pf.id'); return $query->find(); } }