protected function BlazyCreationTestTrait::getBlazyFieldStorageDefinition in Blazy 8.2
Same name and namespace in other branches
- 8 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 98
Class
- BlazyCreationTestTrait
- A Trait common for Blazy tests.
Namespace
Drupal\Tests\blazy\TraitsCode
protected function getBlazyFieldStorageDefinition($field_name = '') {
$field_name = empty($field_name) ? $this->testFieldName : $field_name;
$field_storage_definitions = $this->entityFieldManager
->getFieldStorageDefinitions($this->entityType);
return isset($field_storage_definitions[$field_name]) ? $field_storage_definitions[$field_name] : FALSE;
}