[], 'content' => [] ]; foreach($data['MetaTemplates'] as $metaTemplate) { if (!empty($metaTemplate->meta_template_fields)) { $tabData['navs'][] = [ 'html' => $this->element('/genericElements/MetaTemplates/metaTemplateNav', ['metaTemplate' => $metaTemplate]) ]; $fields = []; foreach ($metaTemplate->meta_template_fields as $metaTemplateField) { $labelPrintedOnce = false; if (!empty($metaTemplateField->metaFields)) { foreach ($metaTemplateField->metaFields as $metaField) { $fields[] = [ 'key' => !$labelPrintedOnce ? $metaField->field : '', 'raw' => $metaField->value, 'warning' => $metaField->warning ?? null, 'info' => $metaField->info ?? null, 'danger' => $metaField->danger ?? null ]; $labelPrintedOnce = true; } } } $listTable = $this->Bootstrap->listTable([ 'hover' => false, 'elementsRootPath' => '/genericElements/SingleViews/Fields/' ],[ 'item' => false, 'fields' => $fields, 'caption' => __n( 'This meta-template contains {0} meta-field', 'This meta-template contains {0} meta-fields', count($fields), count($fields) ) ]); if (!empty($metaTemplate['hasNewerVersion']) && !empty($fields)) { $listTable = $this->Bootstrap->alert([ 'html' => sprintf( '