public function Bynder::createMetadataFieldStorage in Bynder 8.2
Same name and namespace in other branches
- 8.3 src/Plugin/media/Source/Bynder.php \Drupal\bynder\Plugin\media\Source\Bynder::createMetadataFieldStorage()
- 4.0.x src/Plugin/media/Source/Bynder.php \Drupal\bynder\Plugin\media\Source\Bynder::createMetadataFieldStorage()
Creates the metadata field storage definition.
Return value
\Drupal\field\FieldStorageConfigInterface The unsaved field storage definition.
File
- src/
Plugin/ media/ Source/ Bynder.php, line 432
Class
- Bynder
- Provides media source plugin for Bynder.
Namespace
Drupal\bynder\Plugin\media\SourceCode
public function createMetadataFieldStorage() {
return $this->entityTypeManager
->getStorage('field_storage_config')
->create([
'entity_type' => 'media',
'field_name' => BynderMetadataItem::METADATA_FIELD_NAME,
'type' => 'bynder_metadata',
'cardinality' => 1,
'locked' => TRUE,
]);
}