throw new \
Exception('Only AssociationFields, FkFields/ReferenceVersionFields for a ManyToOneAssociationField or fields flagged as Runtime can be added as Extension.'
);
} if (!
$this->
hasAssociationWithStorageName($field->
getStorageName(),
$new)) { throw new \
Exception(sprintf('FkField %s has no configured OneToOneAssociationField or ManyToOneAssociationField in entity %s',
$field->
getPropertyName(),
$this->className
));
} $fields->
add($field);
} } foreach ($this->
getBaseFields() as $baseField) { $fields->
add($baseField);
} foreach ($fields as $field) { if ($field instanceof TranslationsAssociationField
) { $this->translationField =
$field;
$fields->
add( (new JsonField('translated', 'translated'
))->
addFlags(new ApiAware(),
new Computed(),
new Runtime()) );
break;
}