public static function FieldTargetDefinition::createFromFieldDefinition in Feeds 8.3
Creates a target definition form a field definition.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.
Return value
\Drupal\feeds\FieldTargetDefinition A new target definition.
7 calls to FieldTargetDefinition::createFromFieldDefinition()
- FieldTargetDefinitionTest::testGetPropertyDescription in tests/
src/ Unit/ FieldTargetDefinitionTest.php - Tests that the description is taken from field definition.
- FieldTargetDefinitionTest::testGetPropertyDescriptionOfNonExistingProperty in tests/
src/ Unit/ FieldTargetDefinitionTest.php - Tests no errors when the description for a custom property isn't set.
- FieldTargetDefinitionTest::testGetPropertyDescriptionWithCustomSetDescription in tests/
src/ Unit/ FieldTargetDefinitionTest.php - Tests that a custom set property description takes precedence.
- FieldTargetDefinitionTest::testGetPropertyLabel in tests/
src/ Unit/ FieldTargetDefinitionTest.php - Tests that the label is taken from field definition.
- FieldTargetDefinitionTest::testGetPropertyLabelOfNonExistingProperty in tests/
src/ Unit/ FieldTargetDefinitionTest.php - Tests no errors when the label for a custom property isn't set.
File
- src/
FieldTargetDefinition.php, line 35
Class
- FieldTargetDefinition
- Provides a field definition wrapped over a field definition.
Namespace
Drupal\feedsCode
public static function createFromFieldDefinition(FieldDefinitionInterface $field_definition) {
return static::create()
->setFieldDefinition($field_definition);
}