PMA\libraries\navigation\nodes\Node::__construct PHP Method

__construct() public method

Initialises the class by setting the mandatory variables
public __construct ( string $name, integer $type = Node::OBJECT, boolean $is_group = false )
$name string An identifier for the new node
$type integer Type of node, may be one of CONTAINER or OBJECT
$is_group boolean Whether this object has been created while grouping nodes
    public function __construct($name, $type = Node::OBJECT, $is_group = false)
    {
        if (!empty($name)) {
            $this->name = $name;
            $this->real_name = $name;
        }
        if ($type === Node::CONTAINER) {
            $this->type = Node::CONTAINER;
        }
        $this->is_group = (bool) $is_group;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Initialises the class
  *
  * @param string $name     An identifier for the new node
  * @param int    $type     Type of node, may be one of CONTAINER or OBJECT
  * @param bool   $is_group Whether this object has been created
  *                         while grouping nodes
  */
 public function __construct($name, $type = Node::OBJECT, $is_group = false)
 {
     parent::__construct($name, $type, $is_group);
     $this->icon = PMA\libraries\Util::getImage('b_index.png', __('Index'));
     $this->links = array('text' => 'tbl_indexes.php?server=' . $GLOBALS['server'] . '&db=%3$s&table=%2$s&index=%1$s' . '&token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_indexes.php?server=' . $GLOBALS['server'] . '&db=%3$s&table=%2$s&index=%1$s' . '&token=' . $_SESSION[' PMA_token ']);
     $this->classes = 'index';
 }
All Usage Examples Of PMA\libraries\navigation\nodes\Node::__construct