fix: [component:CRUD] Filtering view variables get correctly set

pull/93/head
Sami Mokaddem 2022-01-20 13:54:17 +01:00
parent e6ec31ff23
commit ec76948ebd
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 4 additions and 0 deletions

View File

@ -159,11 +159,15 @@ class CRUDComponent extends Component
if ($this->taggingSupported()) {
$this->Controller->set('taggingEnabled', true);
$this->setAllTags();
} else {
$this->Controller->set('taggingEnabled', false);
}
if ($this->metaFieldsSupported()) {
$metaTemplates = $this->getMetaTemplates()->toArray();
$this->Controller->set('metaFieldsEnabled', true);
$this->Controller->set('metaTemplates', $metaTemplates);
} else {
$this->Controller->set('metaFieldsEnabled', false);
}
$filters = !empty($this->Controller->filterFields) ? $this->Controller->filterFields : [];
$this->Controller->set('filters', $filters);