public function BlazyFormatterTrait::buildSettings in Blazy 8.2
Builds the settings.
1 call to BlazyFormatterTrait::buildSettings()
- BlazyTextFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ BlazyTextFormatter.php - Builds a renderable array for a field value.
1 method overrides BlazyFormatterTrait::buildSettings()
- BlazyTestEntityReferenceFormatterTest::buildSettings in tests/
modules/ blazy_test/ src/ Plugin/ Field/ FieldFormatter/ BlazyTestEntityReferenceFormatterTest.php - Builds the settings.
File
- src/
Plugin/ Field/ FieldFormatter/ BlazyFormatterTrait.php, line 76
Class
- BlazyFormatterTrait
- A Trait common for all blazy formatters.
Namespace
Drupal\blazy\Plugin\Field\FieldFormatterCode
public function buildSettings() {
$settings = array_merge($this
->getCommonFieldDefinition(), $this
->getSettings());
$settings['blazy'] = TRUE;
$settings['item_id'] = $settings['lazy'] = 'blazy';
$settings['_grid'] = !empty($settings['style']) && !empty($settings['grid']);
$settings['third_party'] = $this
->getThirdPartySettings();
// Exposes few basic formatter settings w/o use_field.
$settings['label'] = $this->fieldDefinition
->getLabel();
$settings['label_display'] = $this->label;
return $settings;
}