當前位置: 首頁>>代碼示例>>PHP>>正文


PHP navigation\NodeFactory類代碼示例

本文整理匯總了PHP中PMA\libraries\navigation\NodeFactory的典型用法代碼示例。如果您正苦於以下問題:PHP NodeFactory類的具體用法?PHP NodeFactory怎麽用?PHP NodeFactory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了NodeFactory類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testConstructor

 /**
  * Test for __construct
  *
  * @return void
  */
 public function testConstructor()
 {
     $parent = NodeFactory::getInstance('NodeEventContainer');
     $this->assertArrayHasKey('text', $parent->links);
     $this->assertContains('db_events.php', $parent->links['text']);
     $this->assertEquals('events', $parent->real_name);
 }
開發者ID:flash1452,項目名稱:phpmyadmin,代碼行數:12,代碼來源:NodeEventContainerTest.php

示例2: testConstructor

 /**
  * Test for PMA\libraries\navigation\NodeFactory::__construct
  *
  * @return void
  */
 public function testConstructor()
 {
     $parent = NodeFactory::getInstance('NodeColumnContainer');
     $this->assertArrayHasKey('text', $parent->links);
     $this->assertContains('tbl_structure.php', $parent->links['text']);
     $this->assertEquals('columns', $parent->real_name);
 }
開發者ID:flash1452,項目名稱:phpmyadmin,代碼行數:12,代碼來源:NodeColumnContainerTest.php

示例3: testConstructor

 /**
  * Test for __construct
  *
  * @return void
  */
 public function testConstructor()
 {
     $parent = NodeFactory::getInstance('NodeViewContainer');
     $this->assertArrayHasKey('text', $parent->links);
     $this->assertContains('db_structure.php', $parent->links['text']);
     $this->assertEquals('views', $parent->real_name);
     $this->assertContains('viewContainer', $parent->classes);
 }
開發者ID:flash1452,項目名稱:phpmyadmin,代碼行數:13,代碼來源:NodeViewContainerTest.php

示例4: testConstructor

 /**
  * Test for __construct
  *
  * @return void
  */
 public function testConstructor()
 {
     $parent = NodeFactory::getInstance('NodeView');
     $this->assertArrayHasKey('text', $parent->links);
     $this->assertContains('sql.php', $parent->links['text']);
     $this->assertContains('b_props', $parent->icon);
     $this->assertContains('view', $parent->classes);
 }
開發者ID:akandshuvo,項目名稱:phpmyadmin,代碼行數:13,代碼來源:NodeViewTest.php

示例5: testGetHtmlForControlButtons

 /**
  * 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);
 }
開發者ID:pboutin44,項目名稱:maintest,代碼行數:16,代碼來源:NodeDatabaseChildTest.php

示例6: __construct

 /**
  * Initialises the class
  *
  * @param string $name An identifier for the new node
  */
 public function __construct($name)
 {
     parent::__construct($name, Node::CONTAINER);
     if ($GLOBALS['is_create_db_priv'] && $GLOBALS['cfg']['ShowCreateDb'] !== false) {
         $new = NodeFactory::getInstance('Node', _pgettext('Create new database', 'New'));
         $new->isNew = true;
         $new->icon = PMA\libraries\Util::getImage('b_newdb.png', '');
         $new->links = array('text' => 'server_databases.php?server=' . $GLOBALS['server'], 'icon' => 'server_databases.php?server=' . $GLOBALS['server']);
         $new->classes = 'new_database italics';
         $this->addChild($new);
     }
 }
開發者ID:phpmyadmin,項目名稱:phpmyadmin,代碼行數:17,代碼來源:NodeDatabaseContainer.php

示例7: __construct

 /**
  * Initialises the class
  */
 public function __construct()
 {
     parent::__construct(__('Triggers'), Node::CONTAINER);
     $this->icon = PMA\libraries\Util::getImage('b_triggers.png');
     $this->links = array('text' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s&amp;token=' . $_SESSION[' PMA_token '], 'icon' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s&amp;token=' . $_SESSION[' PMA_token ']);
     $this->real_name = 'triggers';
     $new = NodeFactory::getInstance('Node', _pgettext('Create new trigger', 'New'));
     $new->isNew = true;
     $new->icon = PMA\libraries\Util::getImage('b_trigger_add.png', '');
     $new->links = array('text' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&amp;db=%3$s&amp;token=' . $_SESSION[' PMA_token '] . '&amp;add_item=1', 'icon' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&amp;db=%3$s&amp;token=' . $_SESSION[' PMA_token '] . '&amp;add_item=1');
     $new->classes = 'new_trigger italics';
     $this->addChild($new);
 }
開發者ID:itgsod-philip-skalander,項目名稱:phpmyadmin,代碼行數:16,代碼來源:NodeTriggerContainer.php

示例8: __construct

 /**
  * Initialises the class
  */
 public function __construct()
 {
     parent::__construct(__('Events'), Node::CONTAINER);
     $this->icon = PMA\libraries\Util::getImage('b_events.png', '');
     $this->links = array('text' => 'db_events.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s', 'icon' => 'db_events.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s');
     $this->real_name = 'events';
     $new = NodeFactory::getInstance('Node', _pgettext('Create new event', 'New'));
     $new->isNew = true;
     $new->icon = PMA\libraries\Util::getImage('b_event_add.png', '');
     $new->links = array('text' => 'db_events.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&add_item=1', 'icon' => 'db_events.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&add_item=1');
     $new->classes = 'new_event italics';
     $this->addChild($new);
 }
開發者ID:phpmyadmin,項目名稱:phpmyadmin,代碼行數:16,代碼來源:NodeEventContainer.php

示例9: __construct

 /**
  * Initialises the class
  */
 public function __construct()
 {
     parent::__construct(__('Functions'), Node::CONTAINER);
     $this->icon = PMA\libraries\Util::getImage('b_routines.png', __('Functions'));
     $this->links = array('text' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;token=' . $_SESSION[' PMA_token '] . '&amp;type=FUNCTION', 'icon' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;token=' . $_SESSION[' PMA_token '] . '&amp;type=FUNCTION');
     $this->real_name = 'functions';
     $new_label = _pgettext('Create new function', 'New');
     $new = NodeFactory::getInstance('Node', $new_label);
     $new->isNew = true;
     $new->icon = PMA\libraries\Util::getImage('b_routine_add.png', $new_label);
     $new->links = array('text' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;token=' . $_SESSION[' PMA_token '] . '&add_item=1&amp;item_type=FUNCTION', 'icon' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;token=' . $_SESSION[' PMA_token '] . '&add_item=1&amp;item_type=FUNCTION');
     $new->classes = 'new_function italics';
     $this->addChild($new);
 }
開發者ID:itgsod-philip-skalander,項目名稱:phpmyadmin,代碼行數:17,代碼來源:NodeFunctionContainer.php

示例10: __construct

 /**
  * Initialises the class
  */
 public function __construct()
 {
     parent::__construct(__('Indexes'), Node::CONTAINER);
     $this->icon = PMA\libraries\Util::getImage('b_index.png', __('Indexes'));
     $this->links = array('text' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s' . '&amp;token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s' . '&amp;token=' . $_SESSION[' PMA_token ']);
     $this->real_name = 'indexes';
     $new_label = _pgettext('Create new index', 'New');
     $new = NodeFactory::getInstance('Node', $new_label);
     $new->isNew = true;
     $new->icon = PMA\libraries\Util::getImage('b_index_add.png', $new_label);
     $new->links = array('text' => 'tbl_indexes.php?server=' . $GLOBALS['server'] . '&amp;create_index=1&amp;added_fields=2' . '&amp;db=%3$s&amp;table=%2$s&amp;token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_indexes.php?server=' . $GLOBALS['server'] . '&amp;create_index=1&amp;added_fields=2' . '&amp;db=%3$s&amp;table=%2$s&amp;token=' . $_SESSION[' PMA_token ']);
     $new->classes = 'new_index italics';
     $this->addChild($new);
 }
開發者ID:itgsod-philip-skalander,項目名稱:phpmyadmin,代碼行數:17,代碼來源:NodeIndexContainer.php

示例11: __construct

 /**
  * Initialises the class
  */
 public function __construct()
 {
     parent::__construct(__('Columns'), Node::CONTAINER);
     $this->icon = Util::getImage('pause.png', __('Columns'));
     $this->links = array('text' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s' . '&amp;token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s' . '&amp;token=' . $_SESSION[' PMA_token ']);
     $this->real_name = 'columns';
     $new_label = _pgettext('Create new column', 'New');
     $new = NodeFactory::getInstance('Node', $new_label);
     $new->isNew = true;
     $new->icon = Util::getImage('b_column_add.png', $new_label);
     $new->links = array('text' => 'tbl_addfield.php?server=' . $GLOBALS['server'] . '&amp;db=%3$s&amp;table=%2$s' . '&amp;field_where=last&after_field=' . '&amp;token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_addfield.php?server=' . $GLOBALS['server'] . '&amp;db=%3$s&amp;table=%2$s' . '&amp;field_where=last&after_field=' . '&amp;token=' . $_SESSION[' PMA_token ']);
     $new->classes = 'new_column italics';
     $this->addChild($new);
 }
開發者ID:netroby,項目名稱:phpmyadmin,代碼行數:17,代碼來源:NodeColumnContainer.php

示例12: __construct

 /**
  * Initialises the class
  */
 public function __construct()
 {
     parent::__construct(__('Procedures'), Node::CONTAINER);
     $this->icon = PMA\libraries\Util::getImage('b_routines.png', __('Procedures'));
     $this->links = array('text' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;type=PROCEDURE', 'icon' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;type=PROCEDURE');
     $this->real_name = 'procedures';
     $new_label = _pgettext('Create new procedure', 'New');
     $new = NodeFactory::getInstance('Node', $new_label);
     $new->isNew = true;
     $new->icon = PMA\libraries\Util::getImage('b_routine_add.png', $new_label);
     $new->links = array('text' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&add_item=1', 'icon' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&add_item=1');
     $new->classes = 'new_procedure italics';
     $this->addChild($new);
 }
開發者ID:phpmyadmin,項目名稱:phpmyadmin,代碼行數:17,代碼來源:NodeProcedureContainer.php

示例13: __construct

 /**
  * Initialises the class
  */
 public function __construct()
 {
     parent::__construct(__('Tables'), Node::CONTAINER);
     $this->icon = PMA\libraries\Util::getImage('b_browse.png', __('Tables'));
     $this->links = array('text' => 'db_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;tbl_type=table' . '&amp;token=' . $_SESSION[' PMA_token '], 'icon' => 'db_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;tbl_type=table' . '&amp;token=' . $_SESSION[' PMA_token ']);
     $this->real_name = 'tables';
     $this->classes = 'tableContainer subContainer';
     $new_label = _pgettext('Create new table', 'New');
     $new = NodeFactory::getInstance('Node', $new_label);
     $new->isNew = true;
     $new->icon = PMA\libraries\Util::getImage('b_table_add.png', $new_label);
     $new->links = array('text' => 'tbl_create.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_create.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;token=' . $_SESSION[' PMA_token ']);
     $new->classes = 'new_table italics';
     $this->addChild($new);
 }
開發者ID:itgsod-philip-skalander,項目名稱:phpmyadmin,代碼行數:18,代碼來源:NodeTableContainer.php

示例14: __construct

 /**
  * Initialises the class
  */
 public function __construct()
 {
     parent::__construct(__('Views'), Node::CONTAINER);
     $this->icon = PMA\libraries\Util::getImage('b_views.png', __('Views'));
     $this->links = array('text' => 'db_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;tbl_type=view', 'icon' => 'db_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;tbl_type=view');
     $this->classes = 'viewContainer subContainer';
     $this->real_name = 'views';
     $new_label = _pgettext('Create new view', 'New');
     $new = NodeFactory::getInstance('Node', $new_label);
     $new->isNew = true;
     $new->icon = PMA\libraries\Util::getImage('b_view_add.png', $new_label);
     $new->links = array('text' => 'view_create.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s', 'icon' => 'view_create.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s');
     $new->classes = 'new_view italics';
     $this->addChild($new);
 }
開發者ID:phpmyadmin,項目名稱:phpmyadmin,代碼行數:18,代碼來源:NodeViewContainer.php

示例15: testConstructor

 /**
  * Test for __construct
  *
  * @return void
  */
 public function testConstructor()
 {
     $parent = NodeFactory::getInstance('NodeIndex');
     $this->assertArrayHasKey('text', $parent->links);
     $this->assertContains('tbl_indexes.php', $parent->links['text']);
 }
開發者ID:flash1452,項目名稱:phpmyadmin,代碼行數:11,代碼來源:NodeIndexTest.php


注:本文中的PMA\libraries\navigation\NodeFactory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。