Drupal 8  8.0.2
LinkSeparateFormatter Class Reference
Inheritance diagram for LinkSeparateFormatter:

Public Member Functions

 viewElements (FieldItemListInterface $items, $langcode)
 
- Public Member Functions inherited from FormatterBase
 __construct ($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings)
 
 view (FieldItemListInterface $items, $langcode=NULL)
 
 settingsForm (array $form, FormStateInterface $form_state)
 
 settingsSummary ()
 
 prepareView (array $entities_items)
 
- Public Member Functions inherited from PluginSettingsBase
 getSettings ()
 
 getSetting ($key)
 
 setSettings (array $settings)
 
 setSetting ($key, $value)
 
 getThirdPartySettings ($module=NULL)
 
 getThirdPartySetting ($module, $key, $default=NULL)
 
 setThirdPartySetting ($module, $key, $value)
 
 unsetThirdPartySetting ($module, $key)
 
 getThirdPartyProviders ()
 
 calculateDependencies ()
 
 onDependencyRemoval (array $dependencies)
 
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 
 getPluginDefinition ()
 

Static Public Member Functions

static defaultSettings ()
 
- Static Public Member Functions inherited from FormatterBase
static isApplicable (FieldDefinitionInterface $field_definition)
 
- Static Public Member Functions inherited from PluginSettingsBase
static defaultSettings ()
 

Additional Inherited Members

- Protected Member Functions inherited from FormatterBase
 getFieldSettings ()
 
 getFieldSetting ($setting_name)
 
- Protected Member Functions inherited from PluginSettingsBase
 mergeDefaults ()
 
- Protected Attributes inherited from FormatterBase
 $fieldDefinition
 
 $settings
 
 $label
 
 $viewMode
 
- Protected Attributes inherited from PluginSettingsBase
 $settings = array()
 
 $thirdPartySettings = array()
 
 $defaultSettingsMerged = FALSE
 

Detailed Description

Plugin implementation of the 'link_separate' formatter.

( id = "link_separate", label = ("Separate link text and URL"), field_types = { "link" } )

Member Function Documentation

static defaultSettings ( )
static

{Defines the default settings for this plugin.

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

Implements PluginSettingsInterface.

viewElements ( FieldItemListInterface  $items,
  $langcode 
)

{Builds a renderable array for a field value.

Parameters
\Drupal\Core\Field\FieldItemListInterface$itemsThe field values to be rendered.
string$langcodeThe language that should be used to render the field.
Returns
array A renderable array for $items, as an array of child elements keyed by consecutive numeric indexes starting from 0.
}

Implements FormatterInterface.

References LinkFormatter\buildUrl(), FieldItemListInterface\getEntity(), PluginSettingsBase\getSettings(), Drupal\token(), and Unicode\truncate().

Here is the call graph for this function:


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