Collection.php 543 B

123456789101112131415161718192021
  1. <?php
  2. declare(strict_types = 1);
  3. namespace Component\Collection\Util\Controller;
  4. use App\Core\Controller;
  5. use App\Entity\Actor;
  6. use App\Util\Common;
  7. use Component\Collection\Collection as CollectionModule;
  8. class Collection extends Controller
  9. {
  10. public function query(string $query, ?string $locale = null, ?Actor $actor = null): array
  11. {
  12. $actor ??= Common::actor();
  13. $locale ??= Common::currentLanguage()->getLocale();
  14. return CollectionModule::query($query, $this->int('page') ?? 1, $locale, $actor);
  15. }
  16. }