Node_Index.class.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. if (! defined('PHPMYADMIN')) {
  9. exit;
  10. }
  11. /**
  12. * Represents a index node in the navigation tree
  13. *
  14. * @package PhpMyAdmin-Navigation
  15. */
  16. class Node_Index extends Node
  17. {
  18. /**
  19. * Initialises the class
  20. *
  21. * @param string $name An identifier for the new node
  22. * @param int $type Type of node, may be one of CONTAINER or OBJECT
  23. * @param bool $is_group Whether this object has been created
  24. * while grouping nodes
  25. *
  26. * @return Node_Index
  27. */
  28. public function __construct($name, $type = Node::OBJECT, $is_group = false)
  29. {
  30. parent::__construct($name, $type, $is_group);
  31. $this->icon = PMA_Util::getImage('b_index.png', __('Index'));
  32. $this->links = array(
  33. 'text' => 'tbl_indexes.php?server=' . $GLOBALS['server']
  34. . '&amp;db=%3$s&amp;table=%2$s&amp;index=%1$s'
  35. . '&amp;token=' . $GLOBALS['token'],
  36. 'icon' => 'tbl_indexes.php?server=' . $GLOBALS['server']
  37. . '&amp;db=%3$s&amp;table=%2$s&amp;index=%1$s'
  38. . '&amp;token=' . $GLOBALS['token']
  39. );
  40. $this->classes = 'index';
  41. }
  42. }
  43. ?>