本文整理汇总了PHP中Presenter::set方法的典型用法代码示例。如果您正苦于以下问题:PHP Presenter::set方法的具体用法?PHP Presenter::set怎么用?PHP Presenter::set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Presenter
的用法示例。
在下文中一共展示了Presenter::set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
}
/**
* Handler for the reactivate presenter function
*/
if (isset($_POST['form']) && $_POST['form'] == "reactivate_presenter") {
if (isset($_POST['user'])) {
$data = $_POST['user'];
$terminated_date = $data['terminated_date'];
$data['presenter_status_id'] = 3;
$data['terminated_date'] = NULL;
unset($data['status_level_name']);
unset($data['status_level_id']);
unset($data['sponsor']);
require_once APPLICATION_PATH . MODEL_DIR . '/Presenter.php';
$presenter = new Presenter();
$presenter->set($data);
error_log("data:" . var_export($presenter, true));
if ($presenter->save()) {
$result->success = TRUE;
$result->message = "Presenter successfully reactivated.";
//reloads the presenter info after the change is applied.
$result->presnter = $presenter->getPresenterBySequenceId($data['presenter_sequence_id']);
//saves the deleted termination date for logging reference.
$presenter->logTerminationHistory($data['id'], $terminated_date);
} else {
$result->success = FALSE;
$result->message = "Failed to reactivate presenter.";
}
}
}
/**