Node_Column_Container.class.php 1.8 KB

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