public function Basic::selectionElement in Image Effects 8
Same name in this branch
- 8 src/Plugin/image_effects/FontSelector/Basic.php \Drupal\image_effects\Plugin\image_effects\FontSelector\Basic::selectionElement()
- 8 src/Plugin/image_effects/ImageSelector/Basic.php \Drupal\image_effects\Plugin\image_effects\ImageSelector\Basic::selectionElement()
Same name and namespace in other branches
- 8.3 src/Plugin/image_effects/FontSelector/Basic.php \Drupal\image_effects\Plugin\image_effects\FontSelector\Basic::selectionElement()
- 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 27 
Class
- Basic
- Basic font selector plugin.
Namespace
Drupal\image_effects\Plugin\image_effects\FontSelectorCode
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);
}