Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MatcherDumper.php

function MatcherDumper::schemaDefinition

Defines the schema for the router table.

@internal

Return value

array The schema API definition for the SQL storage table.

1 call to MatcherDumper::schemaDefinition()
MatcherDumper::ensureTableExists in core/lib/Drupal/Core/Routing/MatcherDumper.php
Checks if the tree table exists and create it if not.

File

core/lib/Drupal/Core/Routing/MatcherDumper.php, line 203

Class

MatcherDumper
Dumps Route information to a database table.

Namespace

Drupal\Core\Routing

Code

protected function schemaDefinition() {
    $schema = [
        'description' => 'Maps paths to various callbacks (access, page and title)',
        'fields' => [
            'name' => [
                'description' => 'Primary Key: Machine name of this route',
                'type' => 'varchar_ascii',
                'length' => 255,
                'not null' => TRUE,
                'default' => '',
            ],
            'path' => [
                'description' => 'The path for this URI',
                'type' => 'varchar',
                'length' => 255,
                'not null' => TRUE,
                'default' => '',
            ],
            'pattern_outline' => [
                'description' => 'The pattern',
                'type' => 'varchar',
                'length' => 255,
                'not null' => TRUE,
                'default' => '',
            ],
            'fit' => [
                'description' => 'A numeric representation of how specific the path is.',
                'type' => 'int',
                'not null' => TRUE,
                'default' => 0,
            ],
            'route' => [
                'description' => 'A serialized Route object',
                'type' => 'blob',
                'size' => 'big',
            ],
            'number_parts' => [
                'description' => 'Number of parts in this router path.',
                'type' => 'int',
                'not null' => TRUE,
                'default' => 0,
                'size' => 'small',
            ],
        ],
        'indexes' => [
            'pattern_outline_parts' => [
                'pattern_outline',
                'number_parts',
            ],
        ],
        'primary key' => [
            'name',
        ],
    ];
    return $schema;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal