W3cubDocs

/Drupal 8

public function Extension::unserialize

public Extension::unserialize($data)

File

core/lib/Drupal/Core/Extension/Extension.php, line 185

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;
    }
  }
}

© 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!Extension!Extension.php/function/Extension::unserialize/8.1.x