public function ManagerForm::createFieldStorage in Hashtags 8
1 call to ManagerForm::createFieldStorage()
- ManagerForm::addField in src/
Form/ ManagerForm.php
File
- src/
Form/ ManagerForm.php, line 148
Class
Namespace
Drupal\hashtags\FormCode
public function createFieldStorage($entity_type, $field_name) {
$field_storage = FieldStorageConfig::create(array(
'field_name' => $field_name,
'entity_type' => $entity_type,
'type' => 'entity_reference',
'settings' => array(
'target_type' => 'taxonomy_term',
),
'cardinality' => -1,
'locked' => false,
'translatable' => true,
));
$field_storage
->save();
return $field_storage;
}