protected function ButtonFieldBase::elementId in Button Field 8
Same name in this branch
- 8 src/Plugin/Field/FieldFormatter/ButtonFieldBase.php \Drupal\button_field\Plugin\Field\FieldFormatter\ButtonFieldBase::elementId()
- 8 src/Plugin/Field/FieldWidget/ButtonFieldBase.php \Drupal\button_field\Plugin\Field\FieldWidget\ButtonFieldBase::elementId()
Builds the id for a button field element.
@todo Determine if there is a better way to do this.
1 call to ButtonFieldBase::elementId()
- ButtonFieldBase::viewElements in src/
Plugin/ Field/ FieldFormatter/ ButtonFieldBase.php - Builds a renderable array for a field value.
File
- src/
Plugin/ Field/ FieldFormatter/ ButtonFieldBase.php, line 87 - Contains Drupal\button_field\Plugin\Field\FieldFormatter\ButtonFieldBase.
Class
- ButtonFieldBase
- Base implementation for button field formatters.
Namespace
Drupal\button_field\Plugin\Field\FieldFormatterCode
protected function elementId($delta, $language) {
$parts = array(
'view',
str_replace('_', '-', $this->fieldDefinition
->getName()),
$language,
$delta,
'value',
);
return implode('-', $parts);
}