You are here

public function Basic::selectionElement in Image Effects 8.3

Same name in this branch
  1. 8.3 src/Plugin/image_effects/FontSelector/Basic.php \Drupal\image_effects\Plugin\image_effects\FontSelector\Basic::selectionElement()
  2. 8.3 src/Plugin/image_effects/ImageSelector/Basic.php \Drupal\image_effects\Plugin\image_effects\ImageSelector\Basic::selectionElement()
Same name and namespace in other branches
  1. 8 src/Plugin/image_effects/FontSelector/Basic.php \Drupal\image_effects\Plugin\image_effects\FontSelector\Basic::selectionElement()
  2. 8.2 src/Plugin/image_effects/FontSelector/Basic.php \Drupal\image_effects\Plugin\image_effects\FontSelector\Basic::selectionElement()

Return a form element to select the plugin content.

Parameters

array $options: (Optional) An array of additional Form API keys and values.

Return value

array Render array of the form element.

Overrides ImageEffectsPluginBase::selectionElement

1 method overrides Basic::selectionElement()
Dropdown::selectionElement in src/Plugin/image_effects/FontSelector/Dropdown.php
Return a form element to select the plugin content.

File

src/Plugin/image_effects/FontSelector/Basic.php, line 72

Class

Basic
Basic font selector plugin.

Namespace

Drupal\image_effects\Plugin\image_effects\FontSelector

Code

public function selectionElement(array $options = []) {

  // Element.
  return array_merge([
    '#type' => 'textfield',
    '#title' => $this
      ->t('Font URI/path'),
    '#description' => $this
      ->t('An URI, an absolute path, or a relative path. Relative paths will be resolved relative to the Drupal installation directory.'),
    '#element_validate' => [
      [
        $this,
        'validateSelectorUri',
      ],
    ],
  ], $options);
}