2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Displays index edit/creation form and handles it
9 use PhpMyAdmin\Controllers\Table\TableIndexesController
;
10 use PhpMyAdmin\Di\Container
;
12 use PhpMyAdmin\Response
;
14 require_once 'libraries/common.inc.php';
16 $container = Container
::getDefaultContainer();
17 $container->factory('PhpMyAdmin\Controllers\Table\TableIndexesController');
19 'TableIndexesController',
20 'PhpMyAdmin\Controllers\Table\TableIndexesController'
22 $container->set('PhpMyAdmin\Response', Response
::getInstance());
23 $container->alias('response', 'PhpMyAdmin\Response');
25 /* Define dependencies for the concerned controller */
26 $db = $container->get('db');
27 $table = $container->get('table');
28 $dbi = $container->get('dbi');
30 if (!isset($_POST['create_edit_table'])) {
31 include_once 'libraries/tbl_common.inc.php';
33 if (isset($_POST['index'])) {
34 if (is_array($_POST['index'])) {
35 // coming already from form
36 $index = new Index($_POST['index']);
38 $index = $dbi->getTable($db, $table)->getIndex($_POST['index']);
44 $dependency_definitions = array(
48 /** @var TableIndexesController $controller */
49 $controller = $container->get('TableIndexesController', $dependency_definitions);
50 $controller->indexAction();