/** * 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'; }
/** * 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_triggers.png'); $this->links = array('text' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&db=%3$s&item_name=%1$s&edit_item=1' . '&token=' . $_SESSION[' PMA_token '], 'icon' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&db=%3$s&item_name=%1$s&export_item=1' . '&token=' . $_SESSION[' PMA_token ']); $this->classes = 'trigger'; }
/** * 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 = Util::getImage('s_db.png', __('Database operations')); $script_name = Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database'); $this->links = array('text' => $script_name . '?server=' . $GLOBALS['server'] . '&db=%1$s&token=' . $_SESSION[' PMA_token '], 'icon' => 'db_operations.php?server=' . $GLOBALS['server'] . '&db=%1$s&token=' . $_SESSION[' PMA_token '], 'title' => __('Structure')); $this->classes = 'database'; }
/** * 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); } }
/** * 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'] . '&db=%2$s&table=%1$s&token=' . $_SESSION[' PMA_token '], 'icon' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s&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'] . '&db=%3$s&token=' . $_SESSION[' PMA_token '] . '&add_item=1', 'icon' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&db=%3$s&token=' . $_SESSION[' PMA_token '] . '&add_item=1'); $new->classes = 'new_trigger italics'; $this->addChild($new); }
/** * 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'] . '&db=%2$s&table=%1$s' . '&token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s' . '&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'] . '&db=%3$s&table=%2$s' . '&field_where=last&after_field=' . '&token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_addfield.php?server=' . $GLOBALS['server'] . '&db=%3$s&table=%2$s' . '&field_where=last&after_field=' . '&token=' . $_SESSION[' PMA_token ']); $new->classes = 'new_column italics'; $this->addChild($new); }
/** * 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'] . '&db=%2$s&table=%1$s' . '&token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s' . '&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'] . '&create_index=1&added_fields=2' . '&db=%3$s&table=%2$s&token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_indexes.php?server=' . $GLOBALS['server'] . '&create_index=1&added_fields=2' . '&db=%3$s&table=%2$s&token=' . $_SESSION[' PMA_token ']); $new->classes = 'new_index italics'; $this->addChild($new); }
/** * 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('pause.png', __('Column')); $this->links = array('text' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&db=%3$s&table=%2$s&field=%1$s' . '&change_column=1' . '&token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&db=%3$s&table=%2$s&field=%1$s' . '&change_column=1' . '&token=' . $_SESSION[' PMA_token '], 'title' => __('Structure')); }