Drupal 8  8.0.2
LinkBase Class Reference
Inheritance diagram for LinkBase:

Public Member Functions

 __construct (array $configuration, $plugin_id, $plugin_definition, AccessManagerInterface $access_manager)
 
 buildOptionsForm (&$form, FormStateInterface $form_state)
 
 usesGroupBy ()
 
 query ()
 
 render (ResultRow $row)
 
- Public Member Functions inherited from FieldPluginBase
 init (ViewExecutable $view, DisplayPluginBase $display, array &$options=NULL)
 
 query ()
 
 clickSort ($order)
 
 clickSortable ()
 
 label ()
 
 elementType ($none_supported=FALSE, $default_empty=FALSE, $inline=FALSE)
 
 elementLabelType ($none_supported=FALSE, $default_empty=FALSE)
 
 elementWrapperType ($none_supported=FALSE, $default_empty=FALSE)
 
 getElements ()
 
 elementClasses ($row_index=NULL)
 
 tokenizeValue ($value, $row_index=NULL)
 
 elementLabelClasses ($row_index=NULL)
 
 elementWrapperClasses ($row_index=NULL)
 
 getEntity (ResultRow $values)
 
 getValue (ResultRow $values, $field=NULL)
 
 useStringGroupBy ()
 
 submitOptionsForm (&$form, FormStateInterface $form_state)
 
 buildOptionsForm (&$form, FormStateInterface $form_state)
 
 adminSummary ()
 
 preRender (&$values)
 
 render (ResultRow $values)
 
 postRender (ResultRow $row, $output)
 
 advancedRender (ResultRow $values)
 
 isValueEmpty ($value, $empty_zero, $no_skip_empty=TRUE)
 
 renderText ($alter)
 
 theme (ResultRow $values)
 
 themeFunctions ()
 
 adminLabel ($short=FALSE)
 
- Public Member Functions inherited from HandlerBase
 __construct (array $configuration, $plugin_id, $plugin_definition)
 
 init (ViewExecutable $view, DisplayPluginBase $display, array &$options=NULL)
 
 adminLabel ($short=FALSE)
 
 getField ($field=NULL)
 
 sanitizeValue ($value, $type=NULL)
 
 buildOptionsForm (&$form, FormStateInterface $form_state)
 
 setModuleHandler (ModuleHandlerInterface $module_handler)
 
 usesGroupBy ()
 
 buildGroupByForm (&$form, FormStateInterface $form_state)
 
 submitGroupByForm (&$form, FormStateInterface $form_state)
 
 hasExtraOptions ()
 
 defineExtraOptions (&$option)
 
 buildExtraOptionsForm (&$form, FormStateInterface $form_state)
 
 validateExtraOptionsForm ($form, FormStateInterface $form_state)
 
 submitExtraOptionsForm ($form, FormStateInterface $form_state)
 
 canExpose ()
 
 defaultExposeOptions ()
 
 exposedInfo ()
 
 buildExposedForm (&$form, FormStateInterface $form_state)
 
 validateExposed (&$form, FormStateInterface $form_state)
 
 submitExposed (&$form, FormStateInterface $form_state)
 
 buildExposeForm (&$form, FormStateInterface $form_state)
 
 validateExposeForm ($form, FormStateInterface $form_state)
 
 submitExposeForm ($form, FormStateInterface $form_state)
 
 showExposeButton (&$form, FormStateInterface $form_state)
 
 showExposeForm (&$form, FormStateInterface $form_state)
 
 access (AccountInterface $account)
 
 preQuery ()
 
 query ()
 
 postExecute (&$values)
 
 setRelationship ()
 
 ensureMyTable ()
 
 adminSummary ()
 
 isExposed ()
 
 isAGroup ()
 
 multipleExposedInput ()
 
 acceptExposedInput ($input)
 
 storeExposedInput ($input, $status)
 
 getJoin ()
 
 validate ()
 
 broken ()
 
 getDateFormat ($format)
 
 getDateField ()
 
 setViewsData (ViewsData $views_data)
 
 getEntityType ()
 
 displayExposedForm ($form, FormStateInterface $form_state)
 
 submitTemporaryForm ($form, FormStateInterface $form_state)
 
- Public Member Functions inherited from PluginBase
 __construct (array $configuration, $plugin_id, $plugin_definition)
 
 init (ViewExecutable $view, DisplayPluginBase $display, array &$options=NULL)
 
 filterByDefinedOptions (array &$storage)
 
 unpackOptions (&$storage, $options, $definition=NULL, $all=TRUE, $check=TRUE)
 
 destroy ()
 
 buildOptionsForm (&$form, FormStateInterface $form_state)
 
 validateOptionsForm (&$form, FormStateInterface $form_state)
 
 submitOptionsForm (&$form, FormStateInterface $form_state)
 
 query ()
 
 themeFunctions ()
 
 validate ()
 
 summaryTitle ()
 
 pluginTitle ()
 
 usesOptions ()
 
 globalTokenReplace ($string= '', array $options=array())
 
 getAvailableGlobalTokens ($prepared=FALSE, array $types=array())
 
 globalTokenForm (&$form, FormStateInterface $form_state)
 
 calculateDependencies ()
 
 getProvider ()
 
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 
 getPluginDefinition ()
 
- Public Member Functions inherited from DerivativeInspectionInterface
 getBaseId ()
 
 getDerivativeId ()
 
- Public Member Functions inherited from FieldHandlerInterface
 getRenderTokens ($item)
 

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 
- Static Public Member Functions inherited from FieldPluginBase
static trimText ($alter, $value)
 
- Static Public Member Functions inherited from HandlerBase
static getTableJoin ($table, $base_table)
 
static breakString ($str, $force_int=FALSE)
 
- Static Public Member Functions inherited from PluginBase
static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 
static preRenderAddFieldsetMarkup (array $form)
 
static preRenderFlattenData ($form)
 
static queryLanguageSubstitutions ()
 

Protected Member Functions

 currentUser ()
 
 defineOptions ()
 
 checkUrlAccess (ResultRow $row)
 
 getUrlInfo (ResultRow $row)
 
 renderLink (ResultRow $row)
 
 addLangcode (ResultRow $row)
 
 getDefaultLabel ()
 
- Protected Member Functions inherited from FieldPluginBase
 allowAdvancedRender ()
 
 addAdditionalFields ($fields=NULL)
 
 defineOptions ()
 
 getPreviousFieldLabels ()
 
 renderAltered ($alter, $tokens)
 
 renderTrimText ($alter, $value)
 
 renderAsLink ($alter, $text, $tokens)
 
 getFieldTokenPlaceholder ()
 
 getTokenValuesRecursive (array $array, array $parent_keys=array())
 
 addSelfTokens (&$tokens, $item)
 
 documentSelfTokens (&$tokens)
 
 linkGenerator ()
 
 getRenderer ()
 
- Protected Member Functions inherited from HandlerBase
 defineOptions ()
 
 caseTransform ($string, $option)
 
 getModuleHandler ()
 
 placeholder ()
 
 getViewsData ()
 
- Protected Member Functions inherited from PluginBase
 defineOptions ()
 
 setOptionDefaults (array &$storage, array $options)
 
 doFilterByDefinedOptions (array &$storage, array $options)
 
 viewsTokenReplace ($text, $tokens)
 
 listLanguages ($flags=LanguageInterface::STATE_ALL, array $current_values=NULL)
 
 getRenderer ()
 

Protected Attributes

 $accessManager
 
 $currentUser
 
- Protected Attributes inherited from FieldPluginBase
 $linkGenerator
 
 $renderer
 
- Protected Attributes inherited from HandlerBase
 $moduleHandler
 
 $viewsData
 
- Protected Attributes inherited from PluginBase
 $usesOptions = FALSE
 
 $renderer
 

Additional Inherited Members

- Data Fields inherited from FieldPluginBase
const RENDER_TEXT_PHASE_SINGLE_ITEM = 0
 
const RENDER_TEXT_PHASE_COMPLETELY = 1
 
const RENDER_TEXT_PHASE_EMPTY = 2
 
 $field_alias = 'unknown'
 
 $aliases = array()
 
 $original_value = NULL
 
 $additional_fields = array()
 
- Data Fields inherited from HandlerBase
 $query = NULL
 
 $table
 
 $tableAlias
 
 $actualTable
 
 $realField
 
 $field
 
 $actualField
 
 $relationship = NULL
 
- Data Fields inherited from PluginBase
const INCLUDE_NEGOTIATED = 16
 
const INCLUDE_ENTITY = 32
 
const VIEWS_QUERY_LANGUAGE_SITE_DEFAULT = '***LANGUAGE_site_default***'
 
 $options = array()
 
 $view = NULL
 
 $displayHandler
 
 $definition
 

Detailed Description

Field handler to present a link to an entity.

Constructor & Destructor Documentation

__construct ( array  $configuration,
  $plugin_id,
  $plugin_definition,
AccessManagerInterface  $access_manager 
)

Constructs a LinkBase object.

Parameters
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin_id for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
\Drupal\Core\Access\AccessManagerInterface$access_managerThe access manager.

References Drupal\accessManager().

Here is the call graph for this function:

Member Function Documentation

addLangcode ( ResultRow  $row)
protected

Adds language information to the options.

Parameters
\Drupal\views\ResultRow$rowA view result row.

References FieldPluginBase\getEntity().

Referenced by LinkBase\renderLink().

Here is the call graph for this function:

Here is the caller graph for this function:

buildOptionsForm ( $form,
FormStateInterface  $form_state 
)

{Provide a form to edit options for this plugin.}

Implements ViewsPluginInterface.

References t().

Here is the call graph for this function:

checkUrlAccess ( ResultRow  $row)
protected

Checks access to the link route.

Parameters
\Drupal\views\ResultRow$rowA view result row.
Returns
The access result.

References Drupal\accessManager(), LinkBase\currentUser(), and LinkBase\getUrlInfo().

Referenced by LinkBase\render().

Here is the call graph for this function:

Here is the caller graph for this function:

static create ( ContainerInterface  $container,
array  $configuration,
  $plugin_id,
  $plugin_definition 
)
static

{Creates an instance of the plugin.

Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$containerThe container to pull out services used in the plugin.
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin ID for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
Returns
static Returns an instance of this plugin.
}

Implements ContainerFactoryPluginInterface.

currentUser ( )
protected

Gets the current active user.

Todo:
: https://www.drupal.org/node/2105123 put this method in instead.
Returns
The current user.

References Drupal\currentUser().

Referenced by LinkBase\checkUrlAccess().

Here is the call graph for this function:

Here is the caller graph for this function:

defineOptions ( )
protected

{}

References LinkBase\getDefaultLabel().

Here is the call graph for this function:

getDefaultLabel ( )
protected

Returns the default label for this link.

Returns
string The default link label.

References t().

Referenced by LinkBase\defineOptions(), and LinkBase\renderLink().

Here is the call graph for this function:

Here is the caller graph for this function:

getUrlInfo ( ResultRow  $row)
abstractprotected

Returns the URI elements of the link.

Parameters
\Drupal\views\ResultRow$rowA view result row.
Returns
The URI elements of the link.

Referenced by LinkBase\checkUrlAccess(), and LinkBase\renderLink().

Here is the caller graph for this function:

query ( )

{Add anything to the query that we might need to.}

Implements ViewsPluginInterface.

References FieldPluginBase\addAdditionalFields().

Here is the call graph for this function:

render ( ResultRow  $row)

{Renders the field.

Parameters
\Drupal\views\ResultRow$valuesThe values retrieved from a single row of a view's query result.
Returns
string| The rendered output. If the output is safe it will be wrapped in an object that implements MarkupInterface. If it is empty or unsafe it will be a string.
}

Implements FieldHandlerInterface.

References LinkBase\checkUrlAccess(), BubbleableMetadata\createFromObject(), and LinkBase\renderLink().

Here is the call graph for this function:

renderLink ( ResultRow  $row)
protected

Prepares the link to view a entity.

Parameters
\Drupal\views\ResultRow$rowA view result row.
Returns
string Returns a string for the link text.

References LinkBase\addLangcode(), LinkBase\getDefaultLabel(), LinkBase\getUrlInfo(), and HandlerBase\sanitizeValue().

Referenced by LinkBase\render().

Here is the call graph for this function:

Here is the caller graph for this function:

usesGroupBy ( )

{}


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