<?php

if (!isset($meta['model'])) {
    return [];
}

$model = $this->module('content')->model($meta['model']);

if (!$model) {
    return [];
}

$fields = array_map(function($field) {
    return $field['name'];
}, $model['fields'] ?? []);

return $fields;
