You are here

public function Extension::unserialize in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Extension/Extension.php \Drupal\Core\Extension\Extension::unserialize()

File

core/lib/Drupal/Core/Extension/Extension.php, line 190
Contains \Drupal\Core\Extension\Extension.

Class

Extension
Defines an extension (file) object.

Namespace

Drupal\Core\Extension

Code

public function unserialize($data) {
  $data = unserialize($data);

  // Get the app root from the container.
  $this->root = DRUPAL_ROOT;
  $this->type = $data['type'];
  $this->pathname = $data['pathname'];
  $this->filename = $data['filename'];

  // @todo ThemeHandler::listInfo(), ThemeHandler::rebuildThemeData(), and
  //   system_list() are adding custom properties to the Extension object.
  foreach ($data as $property => $value) {
    if (!isset($this->{$property})) {
      $this->{$property} = $value;
    }
  }
}