You are here

protected function DbDumpCommand::getTemplate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Command/DbDumpCommand.php \Drupal\Core\Command\DbDumpCommand::getTemplate()

The script template.

Return value

string The template for the generated PHP script.

1 call to DbDumpCommand::getTemplate()
DbDumpCommand::generateScript in core/lib/Drupal/Core/Command/DbDumpCommand.php
Generates the database script.

File

core/lib/Drupal/Core/Command/DbDumpCommand.php, line 377
Contains \Drupal\Core\Command\DbDumpCommand.

Class

DbDumpCommand
Provides a command to dump the current database to a script.

Namespace

Drupal\Core\Command

Code

protected function getTemplate() {
  $script = <<<'ENDOFSCRIPT'
<?php
/**
 * @file
 * A database agnostic dump for testing purposes.
 *
 * This file was generated by the Drupal 8.0 db-tools.php script.
 */

use Drupal\Core\Database\Database;

$connection = Database::getConnection();

{{TABLES}}

ENDOFSCRIPT;
  return $script;
}