You are here

public function GridStackFormatter::buildSettings in GridStack 8.2

Same name and namespace in other branches
  1. 8 src/GridStackFormatter.php \Drupal\gridstack\GridStackFormatter::buildSettings()

Modifies the field formatter settings inherited by child elements.

Parameters

array $build: The array containing: settings, or potential optionset for extensions.

object $items: The Drupal\Core\Field\FieldItemListInterface items.

Overrides BlazyFormatter::buildSettings

File

src/GridStackFormatter.php, line 15

Class

GridStackFormatter
Implements GridStackFormatterInterface.

Namespace

Drupal\gridstack

Code

public function buildSettings(array &$build, $items) {

  // Prepare integration with Blazy.
  $settings =& $build['settings'];
  $settings = array_merge($settings, GridStackDefault::fixedSettings());

  // Pass basic info to parent::buildSettings().
  parent::buildSettings($build, $items);
  $this
    ->getModuleHandler()
    ->alter('gridstack_settings', $build, $items);
}