2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Displays index edit/creation form and handles it
13 require_once 'libraries/di/Container.class.php';
14 require_once 'libraries/controllers/TableIndexesController.class.php';
15 require_once 'libraries/Index.class.php';
17 $container = DI\Container
::getDefaultContainer();
18 $container->factory('PMA\Controllers\Table\TableIndexesController');
20 'TableIndexesController', 'PMA\Controllers\Table\TableIndexesController'
23 /* Define dependencies for the concerned controller */
24 $db = $container->get('db');
25 $table = $container->get('table');
26 $dbi = $container->get('dbi');
28 if (!isset($_REQUEST['create_edit_table'])) {
29 include_once 'libraries/tbl_common.inc.php';
31 if (isset($_REQUEST['index'])) {
32 if (is_array($_REQUEST['index'])) {
33 // coming already from form
34 $index = new PMA_Index($_REQUEST['index']);
36 $index = $dbi->getTable($db, $table)->getIndex($_REQUEST['index']);
39 $index = new PMA_Index
;
42 $dependency_definitions = array(
46 /** @var Controllers\Table\TableIndexesController $controller */
47 $controller = $container->get('TableIndexesController', $dependency_definitions);
48 $controller->indexAction();