"Fossies" - the Fresh Open Source Software Archive

Member "phpMyAdmin-5.1.0-all-languages/libraries/classes/Navigation/Nodes/NodeIndex.php" (24 Feb 2021, 1197 Bytes) of package /linux/www/phpMyAdmin-5.1.0-all-languages.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "NodeIndex.php": 5.0.4-english_vs_5.1.0-english.

    1 <?php
    2 /**
    3  * Functionality for the navigation tree
    4  */
    5 
    6 declare(strict_types=1);
    7 
    8 namespace PhpMyAdmin\Navigation\Nodes;
    9 
   10 use PhpMyAdmin\Html\Generator;
   11 use PhpMyAdmin\Url;
   12 
   13 /**
   14  * Represents a index node in the navigation tree
   15  */
   16 class NodeIndex extends Node
   17 {
   18     /**
   19      * Initialises the class
   20      *
   21      * @param string $name    An identifier for the new node
   22      * @param int    $type    Type of node, may be one of CONTAINER or OBJECT
   23      * @param bool   $isGroup Whether this object has been created
   24      *                        while grouping nodes
   25      */
   26     public function __construct($name, $type = Node::OBJECT, $isGroup = false)
   27     {
   28         parent::__construct($name, $type, $isGroup);
   29         $this->icon = Generator::getImage('b_index', __('Index'));
   30         $this->links = [
   31             'text' => Url::getFromRoute('/table/indexes', [
   32                 'server' => $GLOBALS['server'],
   33             ]) . '&amp;db=%3$s&amp;table=%2$s&amp;index=%1$s',
   34             'icon' => Url::getFromRoute('/table/indexes', [
   35                 'server' => $GLOBALS['server'],
   36             ]) . '&amp;db=%3$s&amp;table=%2$s&amp;index=%1$s',
   37         ];
   38         $this->classes = 'index';
   39     }
   40 }