public function AmpFormTrait::controlsElement in Accelerated Mobile Pages (AMP) 8.3
The controls form element.
Return value
array A form element.
3 calls to AmpFormTrait::controlsElement()
- AmpImageCarousel::settingsForm in src/
Plugin/ Field/ FieldFormatter/ AmpImageCarousel.php - Returns a form to configure settings for the formatter.
- AmpVideoFormatter::settingsForm in src/
Plugin/ Field/ FieldFormatter/ AmpVideoFormatter.php - Returns a form to configure settings for the formatter.
- AmpViewsCarouselStyle::buildOptionsForm in src/
Plugin/ views/ style/ AmpViewsCarouselStyle.php - Provide a form to edit options for this plugin.
File
- src/
AmpFormTrait.php, line 281
Class
- AmpFormTrait
- AMP Form trait.
Namespace
Drupal\ampCode
public function controlsElement() {
$element = [
'#title' => $this
->t('Controls'),
'#type' => 'checkbox',
'#description' => $this
->t('Display video controls to users.'),
'#default_value' => $this
->getSetting('controls'),
];
return $element;
}