/** * GEt a pulldown for the list of all settings profiles. * * @param $title * @return array */ public static function getSettingsProfileSelector($title) { $options = []; foreach (SettingsProfile::loadMultiple() as $key => $profile) { $options[$key] = $profile->get('label'); } if ($options) { return ['#type' => 'select', '#title' => $title, '#options' => $options]; } }