You are here

protected function DateTime::getElementSelectorInputsOptions in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/DateTime.php \Drupal\webform\Plugin\WebformElement\DateTime::getElementSelectorInputsOptions()

Get an element's (sub)inputs selectors as options.

Parameters

array $element: An element.

Return value

array An array of element (sub)input selectors.

Overrides WebformElementBase::getElementSelectorInputsOptions

File

src/Plugin/WebformElement/DateTime.php, line 135

Class

DateTime
Provides a 'datetime' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function getElementSelectorInputsOptions(array $element) {
  $t_args = [
    '@title' => $this
      ->getAdminLabel($element),
  ];
  return [
    'date' => (string) $this
      ->t('@title [Date]', $t_args),
    'time' => (string) $this
      ->t('@title [Time]', $t_args),
  ];
}