38 if (isset($this->fields[$type][
$subtype])) {
42 $result = (array) $this->events->triggerResults(
'fields',
"{$type}:{$subtype}", [
44 'subtype' => $subtype,
50 if (empty($field[
'name']) || empty($field[
'#type'])) {
51 $this->
getLogger()->warning(
"Field config for '{$type}:{$subtype}' is missing 'name' or '#type' in field: " . print_r($field,
true));
55 if (!isset($field[
'#label'])) {
56 $label_key =
"fields:{$type}:{$subtype}:{$field['name']}";
57 if ($this->translator->languageKeyExists($label_key)) {
58 $field[
'#label'] = $this->translator->translate($label_key);
trait Loggable
Enables adding a logger.
getLogger()
Returns logger.