setName('setup_authentication_type'); } /** * @see Form::createElements() */ public function createElements(array $formData) { $this->addElement( new Note( 'description', array( 'value' => t( 'Please choose how you want to authenticate when accessing Icinga Web 2.' . ' Configuring backend specific details follows in a later step.' ) ) ) ); $backendTypes = array(); if (Platform::extensionLoaded('mysql') || Platform::extensionLoaded('pgsql')) { $backendTypes['db'] = t('Database'); } if (Platform::extensionLoaded('ldap')) { $backendTypes['ldap'] = 'LDAP'; } $backendTypes['autologin'] = t('Autologin'); $this->addElement( 'select', 'type', array( 'required' => true, 'label' => t('Authentication Type'), 'description' => t('The type of authentication to use when accessing Icinga Web 2'), 'multiOptions' => $backendTypes ) ); } }