You are here

public function DateBase::getFormat in YAML Form 8

Get element's format name by looking for '#format' property, global settings, and finally default settings.

Parameters

array $element: An element.

Return value

string An element's format name.

Overrides YamlFormElementBase::getFormat

1 call to DateBase::getFormat()
DateBase::formatText in src/Plugin/YamlFormElement/DateBase.php
Format an element's value as plain text.

File

src/Plugin/YamlFormElement/DateBase.php, line 85

Class

DateBase
Provides a base 'date' class.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

public function getFormat(array $element) {
  if (isset($element['#format'])) {
    return $element['#format'];
  }
  else {
    return parent::getFormat($element);
  }
}