public function Menu::get in Schema 8
Parameters
bool $rebuild: Whether to force a rebuild of schema data.
Return value
array Array of schema information, keyed by table.
Overrides SchemaProviderInterface::get
File
- src/
Plugin/ Schema/ Menu.php, line 24 - Contains Drupal\schema\Plugin\Schema\Menu.
Class
- Menu
- Provides schema information for menu storage tables.
Namespace
Drupal\schema\Plugin\SchemaCode
public function get($rebuild = FALSE) {
$complete_schema = array();
/*
// TODO: the menu.tree_storage is now private, so need to find another way
// to get this table data.
$menu_storage = \Drupal::service('menu.tree_storage');
if ($menu_storage instanceof MenuTreeStorage) {
$reflection = new ReflectionClass(get_class($menu_storage));
$schema_method = $reflection->getMethod('schemaDefinition');
$schema_method->setAccessible(TRUE);
$name_property = $reflection->getProperty('table');
$name_property->setAccessible(TRUE);
$table_name = $name_property->getValue($menu_storage);
$schema = $schema_method->invoke($menu_storage);
$complete_schema[$table_name] = $schema + array('module' => 'Core\Menu');
}
*/
return $complete_schema;
}