trait DatexWidgetTrait in Datex 8
Hierarchy
- trait \DatexWidgetTrait
File
- ./
datex.inc.php, line 64
View source
trait DatexWidgetTrait {
public static function defaultSettings() {
return [
'datex_schema' => 'default',
] + parent::defaultSettings();
}
public function settingsForm(array $form, FormStateInterface $form_state) {
$element = parent::settingsForm($form, $form_state);
$element['datex_schema'] = [
'#type' => 'select',
'#title' => t('Date schema'),
'#default_value' => $this
->getSetting('datex_schema'),
'#options' => _datex_schema_form_options(),
];
return $element;
}
public function settingsSummary() {
$summary = [];
$summary[] = t('Datex schema: @schema', [
'@schema' => $this
->getSetting('datex_schema'),
]);
return $summary;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DatexWidgetTrait:: |
public static | function | ||
DatexWidgetTrait:: |
public | function | ||
DatexWidgetTrait:: |
public | function |