You are here

protected function YamlFormSubmissionViewBuilder::isVisibleElement in YAML Form 8

Determines if an element is visible.

Copied from: \Drupal\Core\Render\Element::isVisibleElement but does not hide hidden or value elements.

Parameters

array $element: The element to check for visibility.

Return value

bool TRUE if the element is visible, otherwise FALSE.

1 call to YamlFormSubmissionViewBuilder::isVisibleElement()
YamlFormSubmissionViewBuilder::buildElements in src/YamlFormSubmissionViewBuilder.php
Build element display items from elements and submitted data.

File

src/YamlFormSubmissionViewBuilder.php, line 237

Class

YamlFormSubmissionViewBuilder
Render controller for form submissions.

Namespace

Drupal\yamlform

Code

protected function isVisibleElement(array $element) {
  return !isset($element['#access']) || ($element['#access'] instanceof AccessResultInterface && $element['#access']
    ->isAllowed() || $element['#access'] === TRUE);
}