\Drupflare\Anachron\Drupal\Extension LegacySystemInfoAlter

Calls `hook_system_info_alter()` with the file argument each implementation was written for.

Drupal 7 passed the {system} row as an object: $file->name, $file->type, $file->uri, $file->filename and $file->info. Drupal 11 passes an Extension, which has no public name. An implementation whose second parameter is typed Extension gets core's object; any other gets the Drupal 7 object. Other {system} columns (status, weight, schema_version) are not set on it.

Summary

Methods
Properties
Constants
run
file
No public properties found
No public constants found
No protected methods found
No protected properties found
No protected constants found
wantsExtension
No private properties found
No private constants found

Methods

run()

run(\Drupal\Core\Extension\ModuleHandlerInterface  $handler, array  $info, \Drupal\Core\Extension\Extension  $extension, string  $type) : void

Runs the alter for one extension.

Parameters

\Drupal\Core\Extension\ModuleHandlerInterface $handler

The handler that finds the implementations.

array $info

The extension's info, edited in place.

\Drupal\Core\Extension\Extension $extension

The extension the info belongs to.

string $type

module, theme or profile.

Returns

void —

file()

file(\Drupal\Core\Extension\Extension  $extension, array  $info, string  $type) : \stdClass

Builds the Drupal 7 object for an extension.

Parameters

\Drupal\Core\Extension\Extension $extension
array $info

The info array so far.

string $type

Returns

\stdClass —

wantsExtension()

wantsExtension(callable  $hook) : bool

Parameters

callable $hook

Returns

bool —