function 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();
    }
}