\Drupal\strata\Plugin\views\field Digest

Renders a content address short enough to read, with the whole thing on hover.

A BLAKE2b digest is 64 hex characters, and a table of them is a wall. Twelve characters is enough to recognise one and to tell two apart, which is what a person reading a report needs; the full digest stays in the title attribute for the case where they need to copy it.

Never use the shortened form as an identifier. It is for a table cell, and this class is the only place that shortening happens for display.

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>

{@inheritdoc}

Parameters

\Drupal\views\ResultRow $values

The row.

Returns

array

The render array, carrying the full digest as a title so it can be copied.

defineOptions()

defineOptions() : array<string,mixed>

{@inheritdoc}

Returns

array

The option definitions.