protected function BlazyCreationTestTrait::getBlazyFieldStorageDefinition in Blazy 8
Same name and namespace in other branches
- 8.2 tests/src/Traits/BlazyCreationTestTrait.php \Drupal\Tests\blazy\Traits\BlazyCreationTestTrait::getBlazyFieldStorageDefinition()
Gets the field storage configuration.
Parameters
string $field_name: Formatted field name.
Return value
\Drupal\field\FieldStorageConfigInterface The field storage definition.
1 call to BlazyCreationTestTrait::getBlazyFieldStorageDefinition()
- BlazyCreationTestTrait::getBlazyFieldDefinition in tests/
src/ Traits/ BlazyCreationTestTrait.php - Gets the field definition.
File
- tests/
src/ Traits/ BlazyCreationTestTrait.php, line 117
Class
- BlazyCreationTestTrait
- A Trait common for Blazy tests.
Namespace
Drupal\Tests\blazy\TraitsCode
protected function getBlazyFieldStorageDefinition($field_name = '') {
if (!$this->fieldStorageDefinition) {
$field_name = empty($field_name) ? $this->testFieldName : $field_name;
$field_storage_definitions = $this->entityFieldManager
->getFieldStorageDefinitions($this->entityType);
$this->fieldStorageDefinition = isset($field_storage_definitions[$field_name]) ? $field_storage_definitions[$field_name] : NULL;
}
return $this->fieldStorageDefinition;
}