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