You are here

private function SiteSettingEntityTypeForm::getFieldsets in Site Settings and Labels 8

Get a list of fieldsets that already exist.

Parameters

object $entity_type: The site settings entity type object.

Return value

array The fieldsets.

1 call to SiteSettingEntityTypeForm::getFieldsets()
SiteSettingEntityTypeForm::form in src/Form/SiteSettingEntityTypeForm.php
Gets the actual form array to be built.

File

src/Form/SiteSettingEntityTypeForm.php, line 145

Class

SiteSettingEntityTypeForm
Class SiteSettingEntityTypeForm.

Namespace

Drupal\site_settings\Form

Code

private function getFieldsets($entity_type) {
  $fieldsets = [];
  if ($bundles = $entity_type
    ->loadMultiple()) {
    foreach ($bundles as $bundle) {
      $fieldsets[] = $bundle->fieldset;
    }
  }
  return array_unique($fieldsets);
}