class NodeColumn extends Node

Represents a columns node in the navigation tree

Constants

CONTAINER

OBJECT

Properties

string $name from Node
string $realName from Node
int $type from Node
bool $isGroup from Node
bool $visible from Node
Node $parent from Node
Node[] $children from Node
Mixed $separator from Node
int $separatorDepth from Node
string|array $icon from Node
$links from Node
string $title from Node
string $classes from Node
bool $isNew from Node
int $pos2 from Node
int $pos3 from Node
protected Relation $relation from Node
string $displayName from Node

Methods

__construct(array $item, int $type = Node::OBJECT, bool $isGroup = false)

Initialises the class

void
addChild(Node $child)

Adds a child node to this node

from Node
false|Node
getChild(string $name, bool $realName = false)

Returns a child node given it's name

from Node
void
removeChild(string $name)

Removes a child node from this node

from Node
array
parents(bool $self = false, bool $containers = false, bool $groups = false)

Retrieves the parents for a node

from Node
Node|false
realParent()

Returns the actual parent of a node. If used twice on an index or columns node, it will return the table and database nodes. The names of the returned nodes can be used in SQL queries, etc.

from Node
bool
hasChildren(bool $countEmptyContainers = true)

This function checks if the node has children nodes associated with it

from Node
bool
hasSiblings()

Returns true if the node has some siblings (other nodes on the same tree level, in the same branch), false otherwise.

from Node
int
numChildren()

Returns the number of child nodes that a node has associated with it

from Node
array
getPaths()

Returns the actual path and the virtual paths for a node both as clean arrays and base64 encoded strings

from Node
array
getData(string $type, int $pos, string $searchClause = '')

Returns the names of children of type $type present inside this container This method is overridden by the PhpMyAdmin\Navigation\Nodes\NodeDatabase and PhpMyAdmin\Navigation\Nodes\NodeTable classes

from Node
int
getPresence(string $type = '', string $searchClause = '')

Returns the number of children of type $type present inside this container This method is overridden by the PhpMyAdmin\Navigation\Nodes\NodeDatabase and PhpMyAdmin\Navigation\Nodes\NodeTable classes

from Node
String
getHtmlForControlButtons()

Returns HTML for control buttons displayed infront of a node

from Node
String
getCssClasses(boolean $match)

Returns CSS classes for a node

from Node
String
getIcon(boolean $match)

Returns icon for the node

from Node
array|null
getNavigationHidingData()

Gets the count of hidden elements for each database

from Node
string
getTruncateValue(string $key, string $value)

Get truncated value for display in node column view

Details

at line 29
__construct(array $item, int $type = Node::OBJECT, bool $isGroup = false)

Initialises the class

Parameters

array $item array to identify the column node
int $type Type of node, may be one of CONTAINER or OBJECT
bool $isGroup Whether this object has been created while grouping nodes

in Node at line 144
void addChild(Node $child)

Adds a child node to this node

Parameters

Node $child A child node

Return Value

void

in Node at line 160
false|Node getChild(string $name, bool $realName = false)

Returns a child node given it's name

Parameters

string $name The name of requested child
bool $realName Whether to use the "realName" instead of "name" in comparisons

Return Value

false|Node The requested child node or false, if the requested node cannot be found

in Node at line 186
void removeChild(string $name)

Removes a child node from this node

Parameters

string $name The name of child to be removed

Return Value

void

in Node at line 205
array parents(bool $self = false, bool $containers = false, bool $groups = false)

Retrieves the parents for a node

Parameters

bool $self Whether to include the Node itself in the results
bool $containers Whether to include nodes of type CONTAINER
bool $groups Whether to include nodes which have $group == true

Return Value

array An array of parent Nodes

in Node at line 234
Node|false realParent()

Returns the actual parent of a node. If used twice on an index or columns node, it will return the table and database nodes. The names of the returned nodes can be used in SQL queries, etc.

..

Return Value

Node|false

in Node at line 252
bool hasChildren(bool $countEmptyContainers = true)

This function checks if the node has children nodes associated with it

Parameters

bool $countEmptyContainers Whether to count empty child containers as valid children

Return Value

bool Whether the node has child nodes

in Node at line 281
bool hasSiblings()

Returns true if the node has some siblings (other nodes on the same tree level, in the same branch), false otherwise.

The only exception is for nodes on the third level of the tree (columns and indexes), for which the function always returns true. This is because we want to render the containers for these nodes

Return Value

bool

in Node at line 306
int numChildren()

Returns the number of child nodes that a node has associated with it

Return Value

int The number of children nodes

in Node at line 326
array getPaths()

Returns the actual path and the virtual paths for a node both as clean arrays and base64 encoded strings

Return Value

array

in Node at line 365
array getData(string $type, int $pos, string $searchClause = '')

Returns the names of children of type $type present inside this container This method is overridden by the PhpMyAdmin\Navigation\Nodes\NodeDatabase and PhpMyAdmin\Navigation\Nodes\NodeTable classes

Parameters

string $type The type of item we are looking for ('tables', 'views', etc)
int $pos The offset of the list within the results
string $searchClause A string used to filter the results of the query

Return Value

array

in Node at line 573
int getPresence(string $type = '', string $searchClause = '')

Returns the number of children of type $type present inside this container This method is overridden by the PhpMyAdmin\Navigation\Nodes\NodeDatabase and PhpMyAdmin\Navigation\Nodes\NodeTable classes

Parameters

string $type The type of item we are looking for ('tables', 'views', etc)
string $searchClause A string used to filter the results of the query

Return Value

int

in Node at line 758
String getHtmlForControlButtons()

Returns HTML for control buttons displayed infront of a node

Return Value

String HTML for control buttons

in Node at line 770
String getCssClasses(boolean $match)

Returns CSS classes for a node

Parameters

boolean $match Whether the node matched loaded tree

Return Value

String with html classes.

in Node at line 796
String getIcon(boolean $match)

Returns icon for the node

Parameters

boolean $match Whether the node matched loaded tree

Return Value

String with image name

in Node at line 815
array|null getNavigationHidingData()

Gets the count of hidden elements for each database

Return Value

array|null array containing the count of hidden elements for each database

at line 107
string getTruncateValue(string $key, string $value)

Get truncated value for display in node column view

Parameters

string $key key to identify default,datatype etc
string $value value corresponding to key

Return Value

string truncated value