本文整理汇总了PHP中NetworkPort::cloneItem方法的典型用法代码示例。如果您正苦于以下问题:PHP NetworkPort::cloneItem方法的具体用法?PHP NetworkPort::cloneItem怎么用?PHP NetworkPort::cloneItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetworkPort
的用法示例。
在下文中一共展示了NetworkPort::cloneItem方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: post_addItem
function post_addItem()
{
global $DB, $CFG_GLPI;
// Manage add from template
if (isset($this->input["_oldID"])) {
// ADD Devices
Item_devices::cloneItem($this->getType(), $this->input["_oldID"], $this->fields['id']);
// ADD Infocoms
Infocom::cloneItem($this->getType(), $this->input["_oldID"], $this->fields['id']);
// ADD Ports
NetworkPort::cloneItem($this->getType(), $this->input["_oldID"], $this->fields['id']);
// ADD Contract
Contract_Item::cloneItem($this->getType(), $this->input["_oldID"], $this->fields['id']);
// ADD Documents
Document_Item::cloneItem($this->getType(), $this->input["_oldID"], $this->fields['id']);
// ADD Computers
Computer_Item::cloneItem($this->getType(), $this->input["_oldID"], $this->fields['id']);
}
}
示例2: post_addItem
function post_addItem()
{
global $DB;
// Manage add from template
if (isset($this->input["_oldID"])) {
// ADD Devices
Item_devices::cloneItem($this->getType(), $this->input["_oldID"], $this->fields['id']);
// ADD Infocoms
Infocom::cloneItem($this->getType(), $this->input["_oldID"], $this->fields['id']);
// ADD volumes
ComputerDisk::cloneComputer($this->input["_oldID"], $this->fields['id']);
// ADD software
Computer_SoftwareVersion::cloneComputer($this->input["_oldID"], $this->fields['id']);
Computer_SoftwareLicense::cloneComputer($this->input["_oldID"], $this->fields['id']);
// ADD Contract
Contract_Item::cloneItem($this->getType(), $this->input["_oldID"], $this->fields['id']);
// ADD Documents
Document_Item::cloneItem($this->getType(), $this->input["_oldID"], $this->fields['id']);
// ADD Ports
NetworkPort::cloneItem($this->getType(), $this->input["_oldID"], $this->fields['id']);
// Add connected devices
Computer_Item::cloneComputer($this->input["_oldID"], $this->fields['id']);
}
}