function EntityViewsData::processViewsDataForTextLong

Same name and namespace in other branches
  1. 9 core/modules/views/src/EntityViewsData.php \Drupal\views\EntityViewsData::processViewsDataForTextLong()
  2. 8.9.x core/modules/views/src/EntityViewsData.php \Drupal\views\EntityViewsData::processViewsDataForTextLong()
  3. 10 core/modules/views/src/EntityViewsData.php \Drupal\views\EntityViewsData::processViewsDataForTextLong()

Processes the views data for a text field with formatting.

Parameters

string $table: The table the field is added to.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.

array $views_field: The views field data.

string $field_column_name: The field column being processed.

File

core/modules/views/src/EntityViewsData.php, line 679

Class

EntityViewsData
Provides generic views integration for entities.

Namespace

Drupal\views

Code

protected function processViewsDataForTextLong($table, FieldDefinitionInterface $field_definition, array &$views_field, $field_column_name) {
    // Connect the text field to its formatter.
    if ($field_column_name == 'value') {
        $views_field['field']['format'] = $field_definition->getName() . '__format';
        $views_field['field']['id'] = 'field';
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.