Node_Event.class.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. require_once 'libraries/navigation/Nodes/Node_DatabaseChild.class.php';
  12. /**
  13. * Represents a event node in the navigation tree
  14. *
  15. * @package PhpMyAdmin-Navigation
  16. */
  17. class Node_Event extends Node_DatabaseChild
  18. {
  19. /**
  20. * Initialises the class
  21. *
  22. * @param string $name An identifier for the new node
  23. * @param int $type Type of node, may be one of CONTAINER or OBJECT
  24. * @param bool $is_group Whether this object has been created
  25. * while grouping nodes
  26. *
  27. * @return Node_Event
  28. */
  29. public function __construct($name, $type = Node::OBJECT, $is_group = false)
  30. {
  31. parent::__construct($name, $type, $is_group);
  32. $this->icon = PMA_Util::getImage('b_events.png');
  33. $this->links = array(
  34. 'text' => 'db_events.php?server=' . $GLOBALS['server']
  35. . '&amp;db=%2$s&amp;item_name=%1$s&amp;edit_item=1'
  36. . '&amp;token=' . $GLOBALS['token'],
  37. 'icon' => 'db_events.php?server=' . $GLOBALS['server']
  38. . '&amp;db=%2$s&amp;item_name=%1$s&amp;export_item=1'
  39. . '&amp;token=' . $GLOBALS['token']
  40. );
  41. $this->classes = 'event';
  42. }
  43. /**
  44. * Returns the type of the item represented by the node.
  45. *
  46. * @return string type of the item
  47. */
  48. protected function getItemType()
  49. {
  50. return 'event';
  51. }
  52. }
  53. ?>