NodeIndex.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Functionality for the navigation tree
  5. *
  6. * @package PhpMyAdmin-Navigation
  7. */
  8. namespace PhpMyAdmin\Navigation\Nodes;
  9. use PhpMyAdmin\Util;
  10. /**
  11. * Represents a index node in the navigation tree
  12. *
  13. * @package PhpMyAdmin-Navigation
  14. */
  15. class NodeIndex extends Node
  16. {
  17. /**
  18. * Initialises the class
  19. *
  20. * @param string $name An identifier for the new node
  21. * @param int $type Type of node, may be one of CONTAINER or OBJECT
  22. * @param bool $is_group Whether this object has been created
  23. * while grouping nodes
  24. */
  25. public function __construct($name, $type = Node::OBJECT, $is_group = false)
  26. {
  27. parent::__construct($name, $type, $is_group);
  28. $this->icon = Util::getImage('b_index', __('Index'));
  29. $this->links = array(
  30. 'text' => 'tbl_indexes.php?server=' . $GLOBALS['server']
  31. . '&amp;db=%3$s&amp;table=%2$s&amp;index=%1$s',
  32. 'icon' => 'tbl_indexes.php?server=' . $GLOBALS['server']
  33. . '&amp;db=%3$s&amp;table=%2$s&amp;index=%1$s',
  34. );
  35. $this->classes = 'index';
  36. }
  37. }