You are here

public function BlazyFilter::buildItemSettings in Blazy 8.2

Returns the item settings for the current $node.

Parameters

array $settings: The settings being modified.

object $node: The HTML DOM object.

Overrides BlazyFilterInterface::buildItemSettings

1 call to BlazyFilter::buildItemSettings()
BlazyFilter::process in src/Plugin/Filter/BlazyFilter.php
Performs the filter processing.

File

src/Plugin/Filter/BlazyFilter.php, line 504

Class

BlazyFilter
Provides a filter to lazyload image, or iframe elements.

Namespace

Drupal\blazy\Plugin\Filter

Code

public function buildItemSettings(array &$settings, $node) {
  $settings['width'] = $node
    ->getAttribute('width');
  $settings['height'] = $node
    ->getAttribute('height');
  $settings['media_switch'] = $this->settings['media_switch'];
}