NodeProcedure.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 procedure node in the navigation tree
  12. *
  13. * @package PhpMyAdmin-Navigation
  14. */
  15. class NodeProcedure extends NodeDatabaseChild
  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_routines', __('Procedure'));
  29. $this->links = array(
  30. 'text' => 'db_routines.php?server=' . $GLOBALS['server']
  31. . '&amp;db=%2$s&amp;item_name=%1$s&amp;item_type=PROCEDURE'
  32. . '&amp;edit_item=1',
  33. 'icon' => 'db_routines.php?server=' . $GLOBALS['server']
  34. . '&amp;db=%2$s&amp;item_name=%1$s&amp;item_type=PROCEDURE'
  35. . '&amp;execute_dialog=1',
  36. );
  37. $this->classes = 'procedure';
  38. }
  39. /**
  40. * Returns the type of the item represented by the node.
  41. *
  42. * @return string type of the item
  43. */
  44. protected function getItemType()
  45. {
  46. return 'procedure';
  47. }
  48. }