2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Displays index edit/creation form and handles it
11 use PMA\libraries\controllers\table\TableIndexesController
;
12 use PMA\libraries\Index
;
13 use PMA\libraries\Response
;
15 require_once 'libraries/common.inc.php';
17 $container = libraries\di\Container
::getDefaultContainer();
18 $container->factory('PMA\libraries\controllers\table\TableIndexesController');
20 'TableIndexesController',
21 'PMA\libraries\controllers\table\TableIndexesController'
23 $container->set('PMA\libraries\Response', Response
::getInstance());
24 $container->alias('response', 'PMA\libraries\Response');
26 /* Define dependencies for the concerned controller */
27 $db = $container->get('db');
28 $table = $container->get('table');
29 $dbi = $container->get('dbi');
31 if (!isset($_REQUEST['create_edit_table'])) {
32 include_once 'libraries/tbl_common.inc.php';
34 if (isset($_REQUEST['index'])) {
35 if (is_array($_REQUEST['index'])) {
36 // coming already from form
37 $index = new Index($_REQUEST['index']);
39 $index = $dbi->getTable($db, $table)->getIndex($_REQUEST['index']);
45 $dependency_definitions = array(
49 /** @var TableIndexesController $controller */
50 $controller = $container->get('TableIndexesController', $dependency_definitions);
51 $controller->indexAction();