"Fossies" - the Fresh Open Source Software Archive

Member "phpMyAdmin-5.1.0-english/libraries/classes/Navigation/Nodes/NodeView.php" (24 Feb 2021, 1384 Bytes) of package /linux/www/phpMyAdmin-5.1.0-english.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. For more information about "NodeView.php" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 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 view node in the navigation tree
   15  */
   16 class NodeView extends NodeDatabaseChild
   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_props', __('View'));
   30         $this->links = [
   31             'text' => Url::getFromRoute('/sql')
   32                 . '&amp;server=' . $GLOBALS['server']
   33                 . '&amp;db=%2$s&amp;table=%1$s&amp;pos=0',
   34             'icon' => Url::getFromRoute('/table/structure')
   35                 . '&amp;server=' . $GLOBALS['server']
   36                 . '&amp;db=%2$s&amp;table=%1$s',
   37         ];
   38         $this->classes = 'view';
   39     }
   40 
   41     /**
   42      * Returns the type of the item represented by the node.
   43      *
   44      * @return string type of the item
   45      */
   46     protected function getItemType()
   47     {
   48         return 'view';
   49     }
   50 }