You are here

function salvattore_admin_settings_form in Salvattore (CSS driven Masonry) 8

Same name and namespace in other branches
  1. 7.2 salvattore.admin.inc \salvattore_admin_settings_form()
  2. 7 salvattore.admin.inc \salvattore_admin_settings_form()

@file Provide administration of PACE module.

3 string references to 'salvattore_admin_settings_form'
SalvattoreAdminSettingsForm::getFormId in src/SalvattoreAdminSettingsForm.php
SalvattoreAdminSettingsForm::getFormId in src/Form/SalvattoreAdminSettingsForm.php
Returns a unique string identifying the form.
salvattore_menu in ./salvattore.module
Implements hook_menu().

File

./salvattore.admin.inc, line 8
Provide administration of PACE module.

Code

function salvattore_admin_settings_form() {
  $form = array();

  // @FIXME
  // Could not extract the default value because it is either indeterminate, or
  // not scalar. You'll need to provide a default value in
  // config/install/salvattore.settings.yml and config/schema/salvattore.schema.yml.
  $form['salvattore_use_min_js'] = array(
    '#title' => t('Javascript file to use'),
    '#description' => t('Please choose whether you want the minified or the full version of the JS file.'),
    '#type' => 'radios',
    '#options' => array(
      '1' => 'Minified',
      '0' => 'Full (debug)',
    ),
    '#default_value' => \Drupal::config('salvattore.settings')
      ->get('salvattore_use_min_js'),
  );

  // @FIXME
  // Could not extract the default value because it is either indeterminate, or
  // not scalar. You'll need to provide a default value in
  // config/install/salvattore.settings.yml and config/schema/salvattore.schema.yml.
  $form['salvattore_load_default_css'] = array(
    '#title' => t('Load default CSS'),
    '#description' => t('Salvattore is easily configurable via CSS and you should write your own in your theme.<br>If some reason you want to use the default then enable this setting.'),
    '#type' => 'checkbox',
    '#default_value' => \Drupal::config('salvattore.settings')
      ->get('salvattore_load_default_css'),
  );
  return system_settings_form($form);
}