You are here

protected function ParagraphsJQueryUIAccordionFormatter::getBundles in Paragraphs jQuery UI Accordion 8

Gets a bundles array suitable for form options.

Return value

array The bundles array that can be passed to form element of type select.

2 calls to ParagraphsJQueryUIAccordionFormatter::getBundles()
ParagraphsJQueryUIAccordionFormatter::getBundleFields in src/Plugin/Field/FieldFormatter/ParagraphsJQueryUIAccordionFormatter.php
Gets a bundle fields array suitable for form options.
ParagraphsJQueryUIAccordionFormatter::settingsForm in src/Plugin/Field/FieldFormatter/ParagraphsJQueryUIAccordionFormatter.php
Returns a form to configure settings for the formatter.

File

src/Plugin/Field/FieldFormatter/ParagraphsJQueryUIAccordionFormatter.php, line 353
Contains \Drupal\paragraphs_jquery_ui_accordion\Plugin\Field\FieldFormatter\ParagraphsJQueryUIAccordionFormatter.

Class

ParagraphsJQueryUIAccordionFormatter
Plugin implementation of the 'paragraphs_jquery_ui_accordion_formatter' formatter.

Namespace

Drupal\paragraphs_jquery_ui_accordion\Plugin\Field\FieldFormatter

Code

protected function getBundles() {
  foreach ($this->bundleInfo
    ->getBundleInfo($this->entityTypeId) as $key => $bundle) {
    $bundles[$key] = $bundle['label'];
  }
  return isset($bundles) ? $bundles : [];
}