Node_Procedure_Container.class.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 procedure nodes in the navigation tree
  13. *
  14. * @package PhpMyAdmin-Navigation
  15. */
  16. class Node_Procedure_Container extends Node
  17. {
  18. /**
  19. * Initialises the class
  20. *
  21. * @return Node_Procedure_Container
  22. */
  23. public function __construct()
  24. {
  25. parent::__construct(__('Procedures'), Node::CONTAINER);
  26. $this->icon = PMA_Util::getImage('b_routines.png', __('Procedures'));
  27. $this->links = array(
  28. 'text' => 'db_routines.php?server=' . $GLOBALS['server']
  29. . '&amp;db=%1$s&amp;token=' . $GLOBALS['token']
  30. . '&amp;type=PROCEDURE',
  31. 'icon' => 'db_routines.php?server=' . $GLOBALS['server']
  32. . '&amp;db=%1$s&amp;token=' . $GLOBALS['token']
  33. . '&amp;type=PROCEDURE',
  34. );
  35. $this->real_name = 'procedures';
  36. $new_label = _pgettext('Create new procedure', 'New');
  37. $new = PMA_NodeFactory::getInstance('Node', $new_label);
  38. $new->isNew = true;
  39. $new->icon = PMA_Util::getImage('b_routine_add.png', $new_label);
  40. $new->links = array(
  41. 'text' => 'db_routines.php?server=' . $GLOBALS['server']
  42. . '&amp;db=%2$s&amp;token=' . $GLOBALS['token']
  43. . '&add_item=1',
  44. 'icon' => 'db_routines.php?server=' . $GLOBALS['server']
  45. . '&amp;db=%2$s&amp;token=' . $GLOBALS['token']
  46. . '&add_item=1',
  47. );
  48. $new->classes = 'new_procedure italics';
  49. $this->addChild($new);
  50. }
  51. }
  52. ?>