NodeTriggerContainer.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 trigger nodes in the navigation tree
  13. *
  14. * @package PhpMyAdmin-Navigation
  15. */
  16. class NodeTriggerContainer extends Node
  17. {
  18. /**
  19. * Initialises the class
  20. */
  21. public function __construct()
  22. {
  23. parent::__construct(__('Triggers'), Node::CONTAINER);
  24. $this->icon = Util::getImage('b_triggers');
  25. $this->links = array(
  26. 'text' => 'db_triggers.php?server=' . $GLOBALS['server']
  27. . '&amp;db=%2$s&amp;table=%1$s',
  28. 'icon' => 'db_triggers.php?server=' . $GLOBALS['server']
  29. . '&amp;db=%2$s&amp;table=%1$s',
  30. );
  31. $this->real_name = 'triggers';
  32. $new = NodeFactory::getInstance(
  33. 'Node',
  34. _pgettext('Create new trigger', 'New')
  35. );
  36. $new->isNew = true;
  37. $new->icon = Util::getImage('b_trigger_add', '');
  38. $new->links = array(
  39. 'text' => 'db_triggers.php?server=' . $GLOBALS['server']
  40. . '&amp;db=%3$s&amp;add_item=1',
  41. 'icon' => 'db_triggers.php?server=' . $GLOBALS['server']
  42. . '&amp;db=%3$s&amp;add_item=1',
  43. );
  44. $new->classes = 'new_trigger italics';
  45. $this->addChild($new);
  46. }
  47. }