public function OptionsFormHelperTrait::getTitleFormatElement in FullCalendar 8.4
Same name and namespace in other branches
- 8.5 src/Plugin/fullcalendar/type/OptionsFormHelperTrait.php \Drupal\fullcalendar\Plugin\fullcalendar\type\OptionsFormHelperTrait::getTitleFormatElement()
- 8.2 src/Plugin/fullcalendar/type/OptionsFormHelperTrait.php \Drupal\fullcalendar\Plugin\fullcalendar\type\OptionsFormHelperTrait::getTitleFormatElement()
Get a title format element.
Parameters
mixed $default: The default value.
string $fieldset: The name of the fieldset.
string $title: The field title.
Return value
array Drupal FAPI array.
1 call to OptionsFormHelperTrait::getTitleFormatElement()
- FullCalendar::buildOptionsForm in src/
Plugin/ fullcalendar/ type/ FullCalendar.php
File
- src/
Plugin/ fullcalendar/ type/ OptionsFormHelperTrait.php, line 226
Class
Namespace
Drupal\fullcalendar\Plugin\fullcalendar\typeCode
public function getTitleFormatElement($default, $fieldset, $title = '') {
return [
'#type' => 'textfield',
'#title' => !empty($title) ? $title : $this
->t('Title format'),
'#description' => $this
->t("Determines the text that will be displayed in the header's title. Enter comma-separated key:value pairs for object properties e.g. year:'numeric', month:'long'. Each view has a specific default. This setting will set the value for all views. @more-info", [
'@more-info' => Link::fromTextAndUrl($this
->t('More info'), Url::fromUri(self::FC_DOCS_URL . '/titleFormat', [
'attributes' => [
'target' => '_blank',
],
]))
->toString(),
]),
'#default_value' => $default,
'#prefix' => '<div class="views-left-50">',
'#suffix' => '</div>',
'#size' => '60',
'#fieldset' => $fieldset,
];
}