\Drupflare\Anachron\Drupal\Extension SystemTable

A Drupal 7 `{system}` table for legacy code, kept in step with the `core.extension` config.

Drupal 11 keeps the installed extensions and their weights in config and has no such table. Legacy modules write module weights to it from hook_install() and read the extension list from it. Rows come from the discovered extensions; a weight written to a row is applied to config, which is what orders hooks in Drupal 11. Writes to other columns, and inserted or deleted rows, never reach config: enabling and disabling belongs to the module installer, and the rows are rebuilt the next time the extension config changes.

Summary

Methods
Properties
Constants
schema
sync
flush
No public properties found
TABLE
No protected methods found
No protected properties found
No protected constants found
wanted
stamp
No private constants found

Constant

TABLE

TABLE = 'system'

Properties

$stamp

$stamp : ?string

What the table was last reconciled against: the connection and the extension config.

Type

string|null

Methods

schema()

schema() : array<string,mixed>

Describes the table.

Returns

array —

The schema definition.

sync()

sync(\Drupal\Core\Database\Connection  $db) : void

Creates the table when missing and brings its rows in line with the extension lists.

Parameters

\Drupal\Core\Database\Connection $db

Returns

void —

flush()

flush(\Drupal\Core\Database\Connection  $db) : array<string,int>

Applies module weights that legacy code wrote to the table to the extension config.

Weights take effect in the container built after this request, as in Drupal 7 where a weight change waited for the hook implementation cache to be rebuilt.

Parameters

\Drupal\Core\Database\Connection $db

Returns

array —

The modules whose weight changed.

wanted()

wanted() : array<string,array<string,mixed>>

Builds the rows the extension lists call for.

Returns

array> —

The rows keyed by type and name.