NodeDatabaseChildContainer.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Represents container node that carries children of a database
  5. *
  6. * @package PhpMyAdmin-Navigation
  7. */
  8. namespace PhpMyAdmin\Navigation\Nodes;
  9. /**
  10. * Represents container node that carries children of a database
  11. *
  12. * @package PhpMyAdmin-Navigation
  13. */
  14. abstract class NodeDatabaseChildContainer extends NodeDatabaseChild
  15. {
  16. /**
  17. * Initialises the class by setting the common variables
  18. *
  19. * @param string $name An identifier for the new node
  20. * @param int $type Type of node, may be one of CONTAINER or OBJECT
  21. */
  22. public function __construct($name, $type = Node::OBJECT)
  23. {
  24. parent::__construct($name, $type);
  25. if ($GLOBALS['cfg']['NavigationTreeEnableGrouping']) {
  26. $this->separator = $GLOBALS['cfg']['NavigationTreeTableSeparator'];
  27. $this->separator_depth = (int)(
  28. $GLOBALS['cfg']['NavigationTreeTableLevel']
  29. );
  30. }
  31. }
  32. /**
  33. * Returns the type of the item represented by the node.
  34. *
  35. * @return string type of the item
  36. */
  37. protected function getItemType()
  38. {
  39. return 'group';
  40. }
  41. }