\Drupal\strata\Plugin\views\field CommitLink

Renders a commit address, abbreviated and marked up so a timeline can attach to it.

Deliberately not a link yet. The timeline and the diff viewer are what a commit id should route to, and inventing a URL for a route that does not exist would ship a table full of broken links. What this does instead is emit the id as a data attribute on a marked-up element, which is what those pages will hook onto when they land - and which is already useful, because a person can select and copy it.

An empty value is an empty cell rather than a dash: a root commit genuinely has no parent, and a placeholder would read as a missing one.

Summary

Methods
Properties
Constants
buildOptionsForm
render
advancedRender
No public properties found
DEFAULT_LENGTH
defineOptions
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Constant

DEFAULT_LENGTH

DEFAULT_LENGTH = 12

Characters shown by default.

Methods

buildOptionsForm()

buildOptionsForm(array  $form, \Drupal\Core\Form\FormStateInterface  $form_state) : void

{@inheritdoc}

Parameters

array $form

The form.

\Drupal\Core\Form\FormStateInterface $form_state

The form state.

Returns

void —

render()

render(\Drupal\views\ResultRow  $values) : string

{@inheritdoc}

Parameters

\Drupal\views\ResultRow $values

The row.

Returns

string —

The rendered value.

advancedRender()

advancedRender(\Drupal\views\ResultRow  $values) : array<string,mixed>|string

{@inheritdoc}

Parameters

\Drupal\views\ResultRow $values

The row.

Returns

array|string —

The render array, or the plain value when there is no commit to mark up.

defineOptions()

defineOptions() : array<string,mixed>

{@inheritdoc}

Returns

array

The option definitions.