Translated using Weblate (Armenian)
[phpmyadmin.git] / tbl_indexes.php
blob854c94ef44d9b3fb70d83762862ce3b956d688f8
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Displays index edit/creation form and handles it
6 * @package PhpMyAdmin
7 */
9 namespace PMA;
11 use PMA_Index;
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');
19 $container->alias(
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']);
35 } else {
36 $index = $dbi->getTable($db, $table)->getIndex($_REQUEST['index']);
38 } else {
39 $index = new PMA_Index;
42 $dependency_definitions = array(
43 "index" => $index
46 /** @var Controllers\Table\TableIndexesController $controller */
47 $controller = $container->get('TableIndexesController', $dependency_definitions);
48 $controller->indexAction();