NodeTrigger.php 1.2 KB

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