W3cubDocs

/Drupal 8

public function ConfigEntityType::getPropertiesToExport

public ConfigEntityType::getPropertiesToExport()

Gets the config entity properties to export if declared on the annotation.

Return value

array|NULL The properties to export or NULL if they can not be determine from the config entity type annotation.

Overrides ConfigEntityTypeInterface::getPropertiesToExport

File

core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php, line 145

Class

ConfigEntityType
Provides an implementation of a configuration entity type and its metadata.

Namespace

Drupal\Core\Config\Entity

Code

public function getPropertiesToExport() {
  if (!empty($this->config_export)) {
    if (empty($this->mergedConfigExport)) {
      // Always add default properties to be exported.
      $this->mergedConfigExport = [
        'uuid' => 'uuid',
        'langcode' => 'langcode',
        'status' => 'status',
        'dependencies' => 'dependencies',
        'third_party_settings' => 'third_party_settings',
        '_core' => '_core',
      ];
      foreach ($this->config_export as $property => $name) {
        if (is_numeric($property)) {
          $this->mergedConfigExport[$name] = $name;
        }
        else {
          $this->mergedConfigExport[$property] = $name;
        }
      }
    }
    return $this->mergedConfigExport;
  }
  return NULL;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!Entity!ConfigEntityType.php/function/ConfigEntityType::getPropertiesToExport/8.1.x