Drupal 8  8.0.2
CommentItem Class Reference
Inheritance diagram for CommentItem:

Public Member Functions

 fieldSettingsForm (array $form, FormStateInterface $form_state)
 
 isEmpty ()
 
 storageSettingsForm (array &$form, FormStateInterface $form_state, $has_data)
 
- Public Member Functions inherited from FieldItemBase
 __construct (DataDefinitionInterface $definition, $name=NULL, TypedDataInterface $parent=NULL)
 
 getEntity ()
 
 getLangcode ()
 
 getFieldDefinition ()
 
 setValue ($values, $notify=TRUE)
 
 __get ($name)
 
 __set ($name, $value)
 
 __isset ($name)
 
 __unset ($name)
 
 view ($display_options=array())
 
 preSave ()
 
 postSave ($update)
 
 delete ()
 
 deleteRevision ()
 
 storageSettingsForm (array &$form, FormStateInterface $form_state, $has_data)
 
 fieldSettingsForm (array $form, FormStateInterface $form_state)
 
- Public Member Functions inherited from Map
 getValue ()
 
 setValue ($values, $notify=TRUE)
 
 getString ()
 
 get ($property_name)
 
 set ($property_name, $value, $notify=TRUE)
 
 getProperties ($include_computed=FALSE)
 
 toArray ()
 
 getIterator ()
 
 isEmpty ()
 
 __clone ()
 
 onChange ($property_name, $notify=TRUE)
 
 applyDefaultValue ($notify=TRUE)
 
- Public Member Functions inherited from TypedData
 __construct ($definition, $name=NULL, TypedDataInterface $parent=NULL)
 
 getPluginId ()
 
 getPluginDefinition ()
 
 getDataDefinition ()
 
 getValue ()
 
 setValue ($value, $notify=TRUE)
 
 getString ()
 
 getConstraints ()
 
 validate ()
 
 applyDefaultValue ($notify=TRUE)
 
 setContext ($name=NULL, TraversableTypedDataInterface $parent=NULL)
 
 getName ()
 
 getRoot ()
 
 getPropertyPath ()
 
 getParent ()
 
- Public Member Functions inherited from TraversableTypedDataInterface
 onChange ($name)
 

Static Public Member Functions

static defaultStorageSettings ()
 
static defaultFieldSettings ()
 
static propertyDefinitions (FieldStorageDefinitionInterface $field_definition)
 
static schema (FieldStorageDefinitionInterface $field_definition)
 
static mainPropertyName ()
 
static generateSampleValue (FieldDefinitionInterface $field_definition)
 
- Static Public Member Functions inherited from FieldItemBase
static defaultStorageSettings ()
 
static defaultFieldSettings ()
 
static mainPropertyName ()
 
static generateSampleValue (FieldDefinitionInterface $field_definition)
 
static storageSettingsToConfigData (array $settings)
 
static storageSettingsFromConfigData (array $settings)
 
static fieldSettingsToConfigData (array $settings)
 
static fieldSettingsFromConfigData (array $settings)
 
static calculateDependencies (FieldDefinitionInterface $field_definition)
 
static calculateStorageDependencies (FieldStorageDefinitionInterface $field_definition)
 
static onDependencyRemoval (FieldDefinitionInterface $field_definition, array $dependencies)
 
- Static Public Member Functions inherited from TypedData
static createInstance ($definition, $name=NULL, TraversableTypedDataInterface $parent=NULL)
 
- Static Public Member Functions inherited from FieldItemInterface
static propertyDefinitions (FieldStorageDefinitionInterface $field_definition)
 
static schema (FieldStorageDefinitionInterface $field_definition)
 

Additional Inherited Members

- Data Fields inherited from CommentItemInterface
const HIDDEN = 0
 
const CLOSED = 1
 
const OPEN = 2
 
const FORM_SEPARATE_PAGE = 0
 
const FORM_BELOW = 1
 
- Protected Member Functions inherited from FieldItemBase
 getSettings ()
 
 getSetting ($setting_name)
 
 writePropertyValue ($property_name, $value)
 
- Protected Member Functions inherited from Map
 writePropertyValue ($property_name, $value)
 
- Protected Attributes inherited from Map
 $definition
 
 $values = array()
 
 $properties = array()
 
- Protected Attributes inherited from TypedData
 $definition
 
 $name
 
 $parent
 

Detailed Description

Plugin implementation of the 'comment' field type.

( id = "comment", label = ("Comments"), description = ("This field manages configuration and presentation of comments on an entity."), list_class = "\Drupal\comment\CommentFieldItemList", default_widget = "comment_default", default_formatter = "comment_default" )

Member Function Documentation

static defaultFieldSettings ( )
static

{Defines the field-level settings for this plugin.

Returns
array A list of default settings, keyed by the setting name.
}

Implements FieldItemInterface.

References CommentManagerInterface\COMMENT_MODE_THREADED, and CommentItemInterface\FORM_BELOW.

static defaultStorageSettings ( )
static

{Defines the storage-level settings for this plugin.

Returns
array A list of default settings, keyed by the setting name.
}

Implements FieldItemInterface.

fieldSettingsForm ( array  $form,
FormStateInterface  $form_state 
)

{}

References FieldItemBase\getSettings(), and t().

Here is the call graph for this function:

static generateSampleValue ( FieldDefinitionInterface  $field_definition)
static
isEmpty ( )

{Determines whether the data structure is empty.

Returns
bool TRUE if the data structure is empty, FALSE otherwise.
}

Implements ComplexDataInterface.

static mainPropertyName ( )
static

{Returns the name of the main property, if any.Some field items consist mainly of one main property, e.g. the value of a text field or the

target_id

of an entity reference. If the field item has no main property, the method returns NULL.

Returns
string|null The name of the value property, or NULL if there is none.
See Also
}

Implements FieldItemInterface.

static propertyDefinitions ( FieldStorageDefinitionInterface  $field_definition)
static

{}

References DataDefinition\create(), and t().

Here is the call graph for this function:

static schema ( FieldStorageDefinitionInterface  $field_definition)
static

{}

storageSettingsForm ( array &  $form,
FormStateInterface  $form_state,
  $has_data 
)

{}

References FieldItemBase\getEntity(), FieldItemBase\getSetting(), Entity\loadMultiple(), t(), and Drupal\url().

Here is the call graph for this function:


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