Node_Trigger_Container.class.php 1.6 KB

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