You are here

public function WebformElementManager::getTranslatableProperties in Webform 6.x

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

Get all translatable properties from all elements.

Return value

array An array of translatable properties.

Overrides WebformElementManagerInterface::getTranslatableProperties

File

src/Plugin/WebformElementManager.php, line 335

Class

WebformElementManager
Provides a plugin manager for webform element plugins.

Namespace

Drupal\webform\Plugin

Code

public function getTranslatableProperties() {
  $properties = [];
  $webform_elements = $this
    ->getInstances();
  foreach ($webform_elements as $webform_element) {
    $translatable_properties = $webform_element
      ->getTranslatableProperties();
    $properties += array_combine($translatable_properties, $translatable_properties);
  }
  ksort($properties);
  return $properties;
}