Drupal 8  8.0.2
FieldTypePluginManager Class Reference
Inheritance diagram for FieldTypePluginManager:

Public Member Functions

 __construct (\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, TypedDataManagerInterface $typed_data_manager)
 
 createInstance ($field_type, array $configuration=array())
 
 createFieldItemList (FieldableEntityInterface $entity, $field_name, $values=NULL)
 
 createFieldItem (FieldItemListInterface $items, $index, $values=NULL)
 
 processDefinition (&$definition, $plugin_id)
 
 getDefaultStorageSettings ($type)
 
 getDefaultFieldSettings ($type)
 
 getUiDefinitions ()
 
 getPluginClass ($type)
 
- Public Member Functions inherited from DefaultPluginManager
 __construct ($subdir,\Traversable $namespaces, ModuleHandlerInterface $module_handler, $plugin_interface=NULL, $plugin_definition_annotation_name= 'Drupal\Component\Annotation\Plugin')
 
 setCacheBackend (CacheBackendInterface $cache_backend, $cache_key, array $cache_tags=array())
 
 getDefinitions ()
 
 clearCachedDefinitions ()
 
 useCaches ($use_caches=FALSE)
 
 processDefinition (&$definition, $plugin_id)
 
- Public Member Functions inherited from PluginManagerBase
 getDefinition ($plugin_id, $exception_on_invalid=TRUE)
 
 getDefinitions ()
 
 createInstance ($plugin_id, array $configuration=array())
 
 getInstance (array $options)
 
- Public Member Functions inherited from DiscoveryInterface
 hasDefinition ($plugin_id)
 
- Public Member Functions inherited from CategorizingPluginManagerInterface
 getCategories ()
 
 getSortedDefinitions (array $definitions=NULL)
 
 getGroupedDefinitions (array $definitions=NULL)
 

Protected Attributes

 $typedDataManager
 
- Protected Attributes inherited from DefaultPluginManager
 $cacheKey
 
 $cacheTags = array()
 
 $alterHook
 
 $subdir
 
 $moduleHandler
 
 $defaults = array()
 
 $pluginDefinitionAnnotationName
 
 $pluginInterface
 
 $namespaces
 
- Protected Attributes inherited from PluginManagerBase
 $discovery
 
 $factory
 
 $mapper
 

Additional Inherited Members

- Protected Member Functions inherited from DefaultPluginManager
 alterInfo ($alter_hook)
 
 getCachedDefinitions ()
 
 setCachedDefinitions ($definitions)
 
 getDiscovery ()
 
 getFactory ()
 
 findDefinitions ()
 
 alterDefinitions (&$definitions)
 
 providerExists ($provider)
 
- Protected Member Functions inherited from PluginManagerBase
 getDiscovery ()
 
 getFactory ()
 

Detailed Description

Plugin manager for 'field type' plugins.

Constructor & Destructor Documentation

__construct ( \Traversable  $namespaces,
CacheBackendInterface  $cache_backend,
ModuleHandlerInterface  $module_handler,
TypedDataManagerInterface  $typed_data_manager 
)

Constructs the FieldTypePluginManager object

Parameters
\Traversable$namespacesAn object that implements which contains the root paths keyed by the corresponding namespace to look for plugin implementations.
\Drupal\Core\Cache\CacheBackendInterface$cache_backendCache backend instance to use.
\Drupal\Core\Extension\ModuleHandlerInterfaceThe module handler.
\Drupal\Core\TypedData\TypedDataManagerInterface$typed_data_managerThe typed data manager.

References DefaultPluginManager\alterInfo(), DefaultPluginManager\setCacheBackend(), and Drupal\typedDataManager().

Here is the call graph for this function:

Member Function Documentation

createFieldItem ( FieldItemListInterface  $items,
  $index,
  $values = NULL 
)

{Creates a new field item as part of a field item list.The provided item list is assigned as the parent of the created item. It However, it is the responsibility of the caller (usually the parent list itself) to have the parent aware of the item as a new child.

Parameters
\Drupal\Core\Field\FieldItemListInterface$itemsThe field item list, for which to create a new item.
int$indexThe list index at which the item is created.
array | null$values(optional) The values to assign to the field item properties.
Returns
The instantiated object.
}

Implements FieldTypePluginManagerInterface.

References Drupal\typedDataManager().

Here is the call graph for this function:

createFieldItemList ( FieldableEntityInterface  $entity,
  $field_name,
  $values = NULL 
)

{Creates a new field item list.The provided entity is assigned as the parent of the created item list. However, it is the responsibility of the caller (usually the parent entity itself) to make the parent aware of the field as a new child.

Parameters
\Drupal\Core\Entity\FieldableEntityInterface$entityThe entity this field item list will be part of.
string$field_nameThe name of the field.
mixed$values(optional) The data value. If set, it has to match one of the supported data type format as documented for the data type classes.
Returns
The instantiated object.
}

Implements FieldTypePluginManagerInterface.

References EntityInterface\getTypedData(), and Drupal\typedDataManager().

Here is the call graph for this function:

createInstance (   $field_type,
array  $configuration = array() 
)

{Creates a pre-configured instance of a plugin.

Parameters
string$plugin_idThe ID of the plugin being instantiated.
array$configurationAn array of configuration relevant to the plugin instance.
Returns
object A fully configured plugin instance.
Exceptions
\Drupal\Component\Plugin\Exception\PluginExceptionIf the instance cannot be created, such as if the ID is invalid.
}

Creates a field item, which is not part of an entity or field item list.

Parameters
string$field_typeThe field type, for which a field item should be created.
array$configurationThe plugin configuration array, i.e. an array with the following keys:
  • field_definition: The field definition object, i.e. an instance of Drupal.
Returns
The instantiated object.

Implements FactoryInterface.

References Drupal\typedDataManager().

Here is the call graph for this function:

getDefaultFieldSettings (   $type)

{Returns the default field-level settings for a field type.

Parameters
string$typeA field type name.
Returns
array The field's default settings, as provided by the plugin definition, or an empty array if type or settings are undefined.
}

Implements FieldTypePluginManagerInterface.

References PluginManagerBase\getDefinition(), and DefaultFactory\getPluginClass().

Here is the call graph for this function:

getDefaultStorageSettings (   $type)

{Returns the default storage-level settings for a field type.

Parameters
string$typeA field type name.
Returns
array The type's default settings, as provided by the plugin definition, or an empty array if type or settings are undefined.
}

Implements FieldTypePluginManagerInterface.

References PluginManagerBase\getDefinition(), and DefaultFactory\getPluginClass().

Here is the call graph for this function:

getPluginClass (   $type)

{Returns the PHP class that implements the field type plugin.

Parameters
string$typeA field type name.
Returns
string Field type plugin class name.
}

Implements FieldTypePluginManagerInterface.

References PluginManagerBase\getDefinition().

Here is the call graph for this function:

getUiDefinitions ( )

{Gets the definition of all field types that can be added via UI.

Returns
array An array of field type definitions.
}

Implements FieldTypePluginManagerInterface.

References DefaultPluginManager\getDefinitions().

Here is the call graph for this function:

processDefinition ( $definition,
  $plugin_id 
)

{}

References t().

Here is the call graph for this function:


The documentation for this class was generated from the following file: