FieldItemInterface

Interface for entity field items.

Entity field items are typed data objects containing the field values, i.e. implementing the ComplexDataInterface.

When implementing this interface which extends Traversable, make sure to list IteratorAggregate or Iterator before this interface in the implements clause.

Hierarchy

See also

\Drupal\Core\Field\FieldItemListInterface

\Drupal\Core\Field\FieldItemBase

Related topics

Field Types API
Defines field, widget, display formatter, and storage types.

File

core/lib/Drupal/Core/Field/FieldItemInterface.php, line 21

Namespace

Drupal\Core\Field

Members

Name Modifiers Type Description
ComplexDataInterface::get public function Gets a property object.
ComplexDataInterface::getDataDefinition public function Gets the data definition. Overrides TypedDataInterface::getDataDefinition
ComplexDataInterface::getProperties public function Gets an array of property objects.
ComplexDataInterface::isEmpty public function Determines whether the data structure is empty.
ComplexDataInterface::set public function Sets a property value.
ComplexDataInterface::toArray public function Returns an array of all property values.
FieldItemInterface::calculateDependencies public static function Calculates dependencies for field items.
FieldItemInterface::calculateStorageDependencies public static function Calculates dependencies for field items on the storage level.
FieldItemInterface::defaultFieldSettings public static function Defines the field-level settings for this plugin.
FieldItemInterface::defaultStorageSettings public static function Defines the storage-level settings for this plugin.
FieldItemInterface::delete public function Defines custom delete behavior for field values.
FieldItemInterface::deleteRevision public function Defines custom revision delete behavior for field values.
FieldItemInterface::fieldSettingsForm public function Returns a form for the field-level settings.
FieldItemInterface::fieldSettingsFromConfigData public static function Returns a settings array in the field type's canonical representation.
FieldItemInterface::fieldSettingsToConfigData public static function Returns a settings array that can be stored as a configuration value.
FieldItemInterface::generateSampleValue public static function Generates placeholder field values.
FieldItemInterface::getEntity public function Gets the entity that field belongs to.
FieldItemInterface::getFieldDefinition public function Gets the field definition.
FieldItemInterface::getLangcode public function Gets the langcode of the field values held in the object.
FieldItemInterface::mainPropertyName public static function Returns the name of the main property, if any.
FieldItemInterface::onDependencyRemoval public static function Informs the plugin that a dependency of the field will be deleted.
FieldItemInterface::postSave public function Defines custom post-save behavior for field values.
FieldItemInterface::preSave public function Defines custom presave behavior for field values.
FieldItemInterface::propertyDefinitions public static function Defines field item properties.
FieldItemInterface::schema public static function Returns the schema for the field.
FieldItemInterface::storageSettingsForm public function Returns a form for the storage-level settings.
FieldItemInterface::storageSettingsFromConfigData public static function Returns a settings array in the field type's canonical representation.
FieldItemInterface::storageSettingsToConfigData public static function Returns a settings array that can be stored as a configuration value.
FieldItemInterface::view public function Returns a renderable array for a single field item.
FieldItemInterface::__get public function Magic method: Gets a property value.
FieldItemInterface::__isset public function Magic method: Determines whether a property is set.
FieldItemInterface::__set public function Magic method: Sets a property value.
FieldItemInterface::__unset public function Magic method: Unsets a property.
TraversableTypedDataInterface::onChange public function React to changes to a child property or item.
TypedDataInterface::applyDefaultValue public function Applies the default value.
TypedDataInterface::createInstance public static function Constructs a TypedData object given its definition and context.
TypedDataInterface::getConstraints public function Gets a list of validation constraints.
TypedDataInterface::getName public function Returns the name of a property or item.
TypedDataInterface::getParent public function Returns the parent data structure; i.e. either complex data or a list.
TypedDataInterface::getPropertyPath public function Returns the property path of the data.
TypedDataInterface::getRoot public function Returns the root of the typed data tree.
TypedDataInterface::getString public function Returns a string representation of the data.
TypedDataInterface::getValue public function Gets the data value.
TypedDataInterface::setContext public function Sets the context of a property or item via a context aware parent.
TypedDataInterface::setValue public function Sets the data value.
TypedDataInterface::validate public function Validates the currently set data value.
doc_Drupal
2016-10-29 09:11:44
Comments
Leave a Comment

Please login to continue.