You are here

private function ExtensionDataCollector::copyToPublic in Devel 8.3

Same name and namespace in other branches
  1. 8 webprofiler/src/DataCollector/ExtensionDataCollector.php \Drupal\webprofiler\DataCollector\ExtensionDataCollector::copyToPublic()
  2. 8.2 webprofiler/src/DataCollector/ExtensionDataCollector.php \Drupal\webprofiler\DataCollector\ExtensionDataCollector::copyToPublic()
  3. 4.x webprofiler/src/DataCollector/ExtensionDataCollector.php \Drupal\webprofiler\DataCollector\ExtensionDataCollector::copyToPublic()

Copies protected properties to public ones.

Parameters

\Drupal\Core\Extension\Extension[] $extensions:

1 call to ExtensionDataCollector::copyToPublic()
ExtensionDataCollector::getData in webprofiler/src/DataCollector/ExtensionDataCollector.php

File

webprofiler/src/DataCollector/ExtensionDataCollector.php, line 145

Class

ExtensionDataCollector
Defines a data collector for the extension system.

Namespace

Drupal\webprofiler\DataCollector

Code

private function copyToPublic($extensions) {
  foreach ($extensions as &$extension) {
    $extension->public_type = $extension
      ->getType();
    $extension->public_name = $extension
      ->getName();
    $extension->public_path = $extension
      ->getPath();
    $extension->public_pathname = $extension
      ->getPathname();
    $extension->public_filename = $extension
      ->getFilename();
    $extension->public_extension_pathname = $extension
      ->getExtensionPathname();
    $extension->public_extension_filename = $extension
      ->getExtensionFilename();
  }
}