Inheritance: extends Node
Exemplo n.º 1
0
 /**
  * Tests getHtmlForControlButtons() method
  *
  * @return void
  * @test
  */
 public function testGetHtmlForControlButtons()
 {
     $parent = NodeFactory::getInstance('NodeDatabase', 'parent');
     $parent->addChild($this->object);
     $this->object->expects($this->once())->method('getItemType')->will($this->returnValue('itemType'));
     $html = $this->object->getHtmlForControlButtons();
     $this->assertStringStartsWith('<span class="navItemControls">', $html);
     $this->assertStringEndsWith('</span>', $html);
     $this->assertContains('<a href="navigation.php' . PMA_URL_getCommon() . '&hideNavItem=true&itemType=itemType&itemName=child' . '&dbName=parent" class="hideNavItem ajax">', $html);
 }
Exemplo n.º 2
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_events.png');
     $this->links = array('text' => 'db_events.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;item_name=%1$s&amp;edit_item=1', 'icon' => 'db_events.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;item_name=%1$s&amp;export_item=1');
     $this->classes = 'event';
 }
Exemplo n.º 3
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_routines.png', __('Function'));
     $this->links = array('text' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;item_name=%1$s&amp;item_type=FUNCTION' . '&amp;edit_item=1&amp;token=' . $_SESSION[' PMA_token '], 'icon' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;item_name=%1$s&amp;item_type=FUNCTION' . '&amp;execute_dialog=1&amp;token=' . $_SESSION[' PMA_token ']);
     $this->classes = 'function';
 }
Exemplo n.º 4
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_props.png', __('View'));
     $this->links = array('text' => 'sql.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s&amp;pos=0', 'icon' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s');
     $this->classes = 'view';
 }
Exemplo n.º 5
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_routines.png', __('Procedure'));
     $this->links = array('text' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;item_name=%1$s&amp;item_type=PROCEDURE' . '&amp;edit_item=1', 'icon' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;item_name=%1$s&amp;item_type=PROCEDURE' . '&amp;execute_dialog=1');
     $this->classes = 'procedure';
 }
 /**
  * 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 = array();
     $this->_addIcon(Util::getScriptNameForOption($GLOBALS['cfg']['NavigationTreeDefaultTabTable'], 'table'));
     $this->_addIcon(Util::getScriptNameForOption($GLOBALS['cfg']['NavigationTreeDefaultTabTable2'], 'table'));
     $title = Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']);
     $this->title = $title;
     $script_name = Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table');
     $this->links = array('text' => $script_name . '?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s' . '&amp;pos=0&amp;token=' . $_SESSION[' PMA_token '], 'icon' => array(Util::getScriptNameForOption($GLOBALS['cfg']['NavigationTreeDefaultTabTable'], 'table') . '?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s&amp;token=' . $_SESSION[' PMA_token '], Util::getScriptNameForOption($GLOBALS['cfg']['NavigationTreeDefaultTabTable2'], 'table') . '?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s&amp;token=' . $_SESSION[' PMA_token ']), 'title' => $this->title);
     $this->classes = 'table';
 }