You are here

public function AmpFormTrait::loopElement in Accelerated Mobile Pages (AMP) 8.3

The loop form element.

Return value

array A form element.

3 calls to AmpFormTrait::loopElement()
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 297

Class

AmpFormTrait
AMP Form trait.

Namespace

Drupal\amp

Code

public function loopElement() {
  $element = [
    '#title' => $this
      ->t('Loop'),
    '#type' => 'checkbox',
    '#description' => $this
      ->t('Loop the video back to the beginning when it completes.'),
    '#default_value' => $this
      ->getSetting('loop'),
  ];
  return $element;
}