NodeEvent.php 1.4 KB

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