diff --git a/src/Forms/Tags.php b/src/Forms/Tags.php index a541abcc2f..aeab4fdd24 100644 --- a/src/Forms/Tags.php +++ b/src/Forms/Tags.php @@ -18,8 +18,12 @@ class Tags extends BaseTags { use Concerns\GetsFormSession, + Concerns\GetsQueryResults, Concerns\GetsRedirects, Concerns\OutputsItems, + Concerns\QueriesConditions, + Concerns\QueriesOrderBys, + Concerns\QueriesScopes, Concerns\RendersForms; const HANDLE_PARAM = ['handle', 'is', 'in', 'form', 'formset']; @@ -184,9 +188,13 @@ public function submission() */ public function submissions() { - $submissions = $this->form()->submissions(); + $query = $this->form()->querySubmissions(); - return $this->output($submissions); + $this->queryConditions($query); + $this->queryScopes($query); + $this->queryOrderBys($query); + + return $this->output($this->results($query)); } /** diff --git a/src/Stache/Query/SubmissionQueryBuilder.php b/src/Stache/Query/SubmissionQueryBuilder.php index 305b9d0af4..0505fa5683 100644 --- a/src/Stache/Query/SubmissionQueryBuilder.php +++ b/src/Stache/Query/SubmissionQueryBuilder.php @@ -2,8 +2,8 @@ namespace Statamic\Stache\Query; -use Illuminate\Support\Collection; use Statamic\Contracts\Forms\SubmissionQueryBuilder as QueryBuilderContract; +use Statamic\Data\DataCollection; use Statamic\Facades; use Statamic\Query\OrderBy; @@ -46,7 +46,7 @@ public function orderBy($column, $direction = 'asc') protected function collect($items = []) { - return Collection::make($items); + return DataCollection::make($items); } protected function getFilteredKeys()