protected MatcherDumper::ensureTableExists()
Checks if the tree table exists and create it if not.
Return value
bool TRUE if the table was created, FALSE otherwise.
File
- core/lib/Drupal/Core/Routing/MatcherDumper.php, line 176
Class
- MatcherDumper
- Dumps Route information to a database table.
Namespace
Drupal\Core\Routing
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | protected function ensureTableExists() { try { if (! $this ->connection->schema()->tableExists( $this ->tableName)) { $this ->connection->schema()->createTable( $this ->tableName, $this ->schemaDefinition()); return TRUE; } } catch (SchemaObjectExistsException $e ) { // If another process has already created the config table, attempting to // recreate it will throw an exception. In this case just catch the // exception and do nothing. return TRUE; } return FALSE; } |
Please login to continue.