You are here

public function DsFieldTemplateBase::massageRenderValues in Display Suite 8.4

Same name and namespace in other branches
  1. 8.2 src/Plugin/DsFieldTemplate/DsFieldTemplateBase.php \Drupal\ds\Plugin\DsFieldTemplate\DsFieldTemplateBase::massageRenderValues()
  2. 8.3 src/Plugin/DsFieldTemplate/DsFieldTemplateBase.php \Drupal\ds\Plugin\DsFieldTemplate\DsFieldTemplateBase::massageRenderValues()

Massages the values before they get rendered.

Parameters

array $field_settings: The ds field settings.

array $values: The values.

Overrides DsFieldTemplateInterface::massageRenderValues

2 methods override DsFieldTemplateBase::massageRenderValues()
Expert::massageRenderValues in src/Plugin/DsFieldTemplate/Expert.php
Massages the values before they get rendered.
Reset::massageRenderValues in src/Plugin/DsFieldTemplate/Reset.php
Massages the values before they get rendered.

File

src/Plugin/DsFieldTemplate/DsFieldTemplateBase.php, line 87

Class

DsFieldTemplateBase
Base class for all the ds plugins.

Namespace

Drupal\ds\Plugin\DsFieldTemplate

Code

public function massageRenderValues(&$field_settings, $values) {
  if (!empty($values['lb'])) {
    $field_settings['lb'] = $values['lb'];
  }
  if (!empty($values['lb-col'])) {
    $field_settings['lb-col'] = TRUE;
  }
  if (isset($values['classes'])) {
    $field_settings['classes'] = $values['classes'];
  }
}