NodeTrigger.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. declare(strict_types=1);
  9. namespace PhpMyAdmin\Navigation\Nodes;
  10. use PhpMyAdmin\Util;
  11. /**
  12. * Represents a trigger node in the navigation tree
  13. *
  14. * @package PhpMyAdmin-Navigation
  15. */
  16. class NodeTrigger extends Node
  17. {
  18. /**
  19. * Initialises the class
  20. *
  21. * @param string $name An identifier for the new node
  22. * @param int $type Type of node, may be one of CONTAINER or OBJECT
  23. * @param bool $isGroup Whether this object has been created
  24. * while grouping nodes
  25. */
  26. public function __construct($name, $type = Node::OBJECT, $isGroup = false)
  27. {
  28. parent::__construct($name, $type, $isGroup);
  29. $this->icon = Util::getImage('b_triggers');
  30. $this->links = [
  31. 'text' => 'db_triggers.php?server=' . $GLOBALS['server']
  32. . '&amp;db=%3$s&amp;item_name=%1$s&amp;edit_item=1',
  33. 'icon' => 'db_triggers.php?server=' . $GLOBALS['server']
  34. . '&amp;db=%3$s&amp;item_name=%1$s&amp;export_item=1',
  35. ];
  36. $this->classes = 'trigger';
  37. }
  38. }