This module adds mobile behaviors to the search facets in the Island Archives olives* themes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

43 lines
962 B

<?php
namespace Drupal\mobile_facets\Form;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Configure Mobile Facets settings.
*/
class SettingsForm extends ConfigFormBase {
/**
* {@inheritdoc}
*/
protected function getEditableConfigNames() {
return ['mobile_facets.settings'];
}
/**
* {@inheritdoc}
*/
public function getFormId() {
return 'mobile_facets_settings_form';
}
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this->config('mobile_facets.settings');
$form['color'] = [
'#type' => 'color',
'#title' => $this->t('Custom Color'),
'#default_value' => $config->get('color') ?? '#000000', // Default to black if not set.
'#description' => $this->t('Enter a hex color code for your module (e.g., #FF0000 for red).'),
];
return parent::buildForm($form, $form_state);
}
}