getHiddenItems() публичный Метод

Return list of hidden items of given type
public getHiddenItems ( string $type ) : array
$type string The type of items we are looking for ('table', 'function', 'group', etc.)
Результат array Array containing hidden items of given type
Пример #1
0
 /**
  * Adds containers to a node that is a database
  *
  * References to existing children are returned
  * if this function is called twice on the same node
  *
  * @param NodeDatabase $db   The database node, new containers will be
  *                           attached to this node
  * @param string       $type The type of item being paginated on
  *                           the second level of the tree
  * @param int          $pos2 The position for the pagination of
  *                           the branch at the second level of the tree
  *
  * @return array An array of new nodes
  */
 private function _addDbContainers($db, $type, $pos2)
 {
     // Get items to hide
     $hidden = $db->getHiddenItems('group');
     if (!$GLOBALS['cfg']['NavigationTreeShowTables'] && !in_array('tables', $hidden)) {
         $hidden[] = 'tables';
     }
     if (!$GLOBALS['cfg']['NavigationTreeShowViews'] && !in_array('views', $hidden)) {
         $hidden[] = 'views';
     }
     if (!$GLOBALS['cfg']['NavigationTreeShowFunctions'] && !in_array('functions', $hidden)) {
         $hidden[] = 'functions';
     }
     if (!$GLOBALS['cfg']['NavigationTreeShowProcedures'] && !in_array('procedures', $hidden)) {
         $hidden[] = 'procedures';
     }
     if (!$GLOBALS['cfg']['NavigationTreeShowEvents'] && !in_array('events', $hidden)) {
         $hidden[] = 'events';
     }
     $retval = array();
     if ($db->hasChildren(true) == 0) {
         if (!in_array('tables', $hidden) && $db->getPresence('tables')) {
             $retval['tables'] = NodeFactory::getInstance('NodeTableContainer');
         }
         if (!in_array('views', $hidden) && $db->getPresence('views')) {
             $retval['views'] = NodeFactory::getInstance('NodeViewContainer');
         }
         if (!in_array('functions', $hidden) && $db->getPresence('functions')) {
             $retval['functions'] = NodeFactory::getInstance('NodeFunctionContainer');
         }
         if (!in_array('procedures', $hidden) && $db->getPresence('procedures')) {
             $retval['procedures'] = NodeFactory::getInstance('NodeProcedureContainer');
         }
         if (!in_array('events', $hidden) && $db->getPresence('events')) {
             $retval['events'] = NodeFactory::getInstance('NodeEventContainer');
         }
         // Add all new Nodes to the tree
         foreach ($retval as $node) {
             if ($type == $node->real_name) {
                 $node->pos2 = $pos2;
             }
             $db->addChild($node);
         }
     } else {
         foreach ($db->children as $node) {
             if ($type == $node->real_name) {
                 $node->pos2 = $pos2;
             }
             $retval[$node->real_name] = $node;
         }
     }
     return $retval;
 }