routingTableDefinition example


class RoutingFixtures {

  /** * Create the tables required for the sample data. * * @param \Drupal\Core\Database\Connection $connection * The connection to use to create the tables. */
  public function createTables(Connection $connection) {
    $tables = $this->routingTableDefinition();
    $schema = $connection->schema();

    foreach ($tables as $name => $table) {
      $schema->dropTable($name);
      $schema->createTable($name$table);
    }
  }

  /** * Drop the tables used for the sample data. * * @param \Drupal\Core\Database\Connection $connection * The connection to use to drop the tables. */
Home | Imprint | This part of the site doesn't use cookies.