本文整理匯總了PHP中Computer_Item::doSpecificMassiveActions方法的典型用法代碼示例。如果您正苦於以下問題:PHP Computer_Item::doSpecificMassiveActions方法的具體用法?PHP Computer_Item::doSpecificMassiveActions怎麽用?PHP Computer_Item::doSpecificMassiveActions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Computer_Item
的用法示例。
在下文中一共展示了Computer_Item::doSpecificMassiveActions方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: doSpecificMassiveActions
/**
* @see CommonDBTM::doSpecificMassiveActions()
**/
function doSpecificMassiveActions($input = array())
{
$res = array('ok' => 0, 'ko' => 0, 'noright' => 0);
switch ($input['action']) {
case "connect":
case "disconnect":
$ci = new Computer_Item();
return $ci->doSpecificMassiveActions($input);
default:
return parent::doSpecificMassiveActions($input);
}
return $res;
}
示例2: doSpecificMassiveActions
/**
* @see CommonDBTM::doSpecificMassiveActions()
**/
function doSpecificMassiveActions($input = array())
{
$res = array('ok' => 0, 'ko' => 0, 'noright' => 0);
switch ($input['action']) {
case "connect":
$ci = new Computer_Item();
return $ci->doSpecificMassiveActions($input);
case "install":
if (isset($input['softwareversions_id']) && $input['softwareversions_id'] > 0) {
$inst = new Computer_SoftwareVersion();
foreach ($input['item'] as $key => $val) {
if ($val == 1) {
$input2 = array('computers_id' => $key, 'softwareversions_id' => $input['softwareversions_id']);
if ($inst->can(-1, 'w', $input2)) {
if ($inst->add($input2)) {
$res['ok']++;
} else {
$res['ko']++;
}
} else {
$res['noright']++;
}
}
}
} else {
$res['ko']++;
}
break;
default:
return parent::doSpecificMassiveActions($input);
}
return $res;
}