public function FieldCollection::fieldSettingsForm in Field collection 8.3
Override EntityReferenceItem field settings form.
These options do not apply to field collections.
Overrides EntityReferenceItem::fieldSettingsForm
File
- src/
Plugin/ Field/ FieldType/ FieldCollection.php, line 121
Class
- FieldCollection
- Plugin implementation of the 'field_collection' field type.
Namespace
Drupal\field_collection\Plugin\Field\FieldTypeCode
public function fieldSettingsForm(array $form, FormStateInterface $form_state) {
$form = parent::fieldSettingsForm($form, $form_state);
$form['handler']['#access'] = FALSE;
$form['handler']['handler_settings']['target_bundles']['#access'] = FALSE;
$form['handler']['handler_settings']['target_bundles']['#default_value'] = [
$this
->getFieldDefinition()
->getName() => $this
->getFieldDefinition()
->getName(),
];
$form['handler']['handler_settings']['auto_create']['#access'] = FALSE;
$form['handler']['handler']['#access'] = FALSE;
$form['handler']['handler_settings']['sort']['field']['#access'] = FALSE;
return $form;
}