8 use Elgg\Traits\Loggable;
44 $entity_class = $this->entityTable->getEntityClass(
$type,
$subtype);
45 $defaults = !empty($entity_class) ? $entity_class::getDefaultFields() : [];
47 $result = (array) $this->events->triggerResults(
'fields',
"{$type}:{$subtype}", [
56 $this->getLogger()->warning(
"Field config for '{$type}:{$subtype}' is missing 'name' or '#type' in field: " . print_r(
$field,
true));
60 if (!isset(
$field[
'#label'])) {
61 $label_key =
"fields:{$type}:{$subtype}:{$field['name']}";
62 if ($this->translator->languageKeyExists($label_key)) {
63 $field[
'#label'] = $this->translator->translate($label_key);
Entity table database service.