You are here

public function YamlFormManagedFileBase::getElementSelectorOptions in YAML Form 8

Get an element's selectors as options.

Parameters

array $element: An element.

Return value

array An array of element selectors.

Overrides YamlFormElementBase::getElementSelectorOptions

File

src/Plugin/YamlFormElement/YamlFormManagedFileBase.php, line 289

Class

YamlFormManagedFileBase
Provides a base class form 'managed_file' elements.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

public function getElementSelectorOptions(array $element) {
  $title = $this
    ->getAdminLabel($element);
  $name = $element['#yamlform_key'];
  return [
    ":input[name=\"files[{$name}]\"]" => $title . '  [' . $this
      ->getPluginLabel() . ']',
  ];
}