本文整理汇总了PHP中RuleAction::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP RuleAction::delete方法的具体用法?PHP RuleAction::delete怎么用?PHP RuleAction::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RuleAction
的用法示例。
在下文中一共展示了RuleAction::delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$input = array();
$input["id"] = $key;
$rulecriteria->delete($input);
}
}
// Can't do this in RuleCriteria, so do it here
$rule->update(array('id' => $_POST['rules_id'], 'date_mod' => $_SESSION['glpi_currenttime']));
Html::back();
} else {
if (isset($_POST["delete_action"])) {
$rulecollection->checkGlobal('w');
if (count($_POST["item"])) {
foreach ($_POST["item"] as $key => $val) {
$input = array();
$input["id"] = $key;
$ruleaction->delete($input);
}
}
// Can't do this in RuleAction, so do it here
$rule->update(array('id' => $_POST['rules_id'], 'date_mod' => $_SESSION['glpi_currenttime']));
Html::back();
} else {
if (isset($_POST["add_criteria"])) {
$rulecollection->checkGlobal('w');
$rulecriteria->add($_POST);
// Can't do this in RuleCriteria, so do it here
$rule->update(array('id' => $_POST['rules_id'], 'date_mod' => $_SESSION['glpi_currenttime']));
Html::back();
} else {
if (isset($_POST["add_action"])) {
$rulecollection->checkGlobal('w');
示例2: Rule
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
* @since version 0.85
*/
include '../inc/includes.php';
$rule = new Rule();
$rule->getFromDB(intval($_POST['rules_id']));
$action = new RuleAction($rule->fields['sub_type']);
if (isset($_POST["add"])) {
$action->check(-1, CREATE, $_POST);
$action->add($_POST);
Html::back();
} else {
if (isset($_POST["update"])) {
$action->check($_POST['id'], UPDATE);
$action->update($_POST);
Html::back();
} else {
if (isset($_POST["purge"])) {
$action->check($_POST['id'], PURGE);
$action->delete($_POST, 1);
Html::back();
}
}
}
示例3: RuleAction
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
* @since version 0.85
*/
include '../inc/includes.php';
$criteria = new RuleAction();
if (isset($_POST["add"])) {
$criteria->check(-1, CREATE, $_POST);
$criteria->add($_POST);
Html::back();
} else {
if (isset($_POST["update"])) {
$criteria->check($_POST['id'], UPDATE);
$criteria->update($_POST);
Html::back();
} else {
if (isset($_POST["purge"])) {
$criteria->check($_POST['id'], PURGE);
$criteria->delete($_POST, 1);
Html::back();
}
}
}