You are here

protected function WebformElementBase::hasCompositeFormElementWrapper in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformElementBase.php \Drupal\webform\Plugin\WebformElementBase::hasCompositeFormElementWrapper()

Determine if the element has a composite field wrapper.

Return value

bool TRUE if the element has a composite field wrapper.

1 call to WebformElementBase::hasCompositeFormElementWrapper()
WebformElementBase::form in src/Plugin/WebformElementBase.php
Gets the actual configuration webform array to be built.

File

src/Plugin/WebformElementBase.php, line 3800

Class

WebformElementBase
Provides a base class for a webform element.

Namespace

Drupal\webform\Plugin

Code

protected function hasCompositeFormElementWrapper() {
  $callbacks = $this->elementInfo
    ->getInfoProperty($this
    ->getPluginId(), '#pre_render') ?: [];
  foreach ($callbacks as $callback) {
    if (is_array($callback) && in_array($callback[1], [
      'preRenderCompositeFormElement',
      'preRenderWebformCompositeFormElement',
    ])) {
      return TRUE;
    }
  }
  return FALSE;
}