public function ParagraphsSliderPlugin::getAllOptionSet

Returns an array of all available slider options.

Return value

array All available optionsets, e.g. ['machine_name' => 'Label'].

4 calls to ParagraphsSliderPlugin::getAllOptionSet()
ParagraphsSliderPlugin::buildBehaviorForm in paragraphs_collection/modules/paragraphs_collection_demo/src/Plugin/paragraphs/Behavior/ParagraphsSliderPlugin.php
Builds a behavior perspective for each paragraph based on its type.
ParagraphsSliderPlugin::buildConfigurationForm in paragraphs_collection/modules/paragraphs_collection_demo/src/Plugin/paragraphs/Behavior/ParagraphsSliderPlugin.php
ParagraphsSliderPlugin::settingsSummary in paragraphs_collection/modules/paragraphs_collection_demo/src/Plugin/paragraphs/Behavior/ParagraphsSliderPlugin.php
Returns a short summary for the current behavior settings.
ParagraphsSliderPlugin::submitConfigurationForm in paragraphs_collection/modules/paragraphs_collection_demo/src/Plugin/paragraphs/Behavior/ParagraphsSliderPlugin.php

File

paragraphs_collection/modules/paragraphs_collection_demo/src/Plugin/paragraphs/Behavior/ParagraphsSliderPlugin.php, line 267

Class

ParagraphsSliderPlugin
Provides Slider plugin.

Namespace

Drupal\paragraphs_collection_demo\Plugin\paragraphs\Behavior

Code

public function getAllOptionSet() {

  /** @var \Drupal\slick\Entity\Slick[] $entities */
  $entities = $this->slickManager
    ->entityLoadMultiple('slick');
  $option_sets = [];
  foreach ($entities as $options_set_id => $option_set) {
    $option_sets[$option_set
      ->id()] = $option_set
      ->label();
  }
  return $option_sets;
}