NodeEventContainer.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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\Navigation\NodeFactory;
  10. use PhpMyAdmin\Util;
  11. /**
  12. * Represents a container for events nodes in the navigation tree
  13. *
  14. * @package PhpMyAdmin-Navigation
  15. */
  16. class NodeEventContainer extends NodeDatabaseChildContainer
  17. {
  18. /**
  19. * Initialises the class
  20. */
  21. public function __construct()
  22. {
  23. parent::__construct(__('Events'), Node::CONTAINER);
  24. $this->icon = Util::getImage('b_events', '');
  25. $this->links = array(
  26. 'text' => 'db_events.php?server=' . $GLOBALS['server']
  27. . '&amp;db=%1$s',
  28. 'icon' => 'db_events.php?server=' . $GLOBALS['server']
  29. . '&amp;db=%1$s',
  30. );
  31. $this->real_name = 'events';
  32. $new = NodeFactory::getInstance(
  33. 'Node',
  34. _pgettext('Create new event', 'New')
  35. );
  36. $new->isNew = true;
  37. $new->icon = Util::getImage('b_event_add', '');
  38. $new->links = array(
  39. 'text' => 'db_events.php?server=' . $GLOBALS['server']
  40. . '&amp;db=%2$s&add_item=1',
  41. 'icon' => 'db_events.php?server=' . $GLOBALS['server']
  42. . '&amp;db=%2$s&add_item=1',
  43. );
  44. $new->classes = 'new_event italics';
  45. $this->addChild($new);
  46. }
  47. }