本文整理匯總了PHP中learnpath::setCategoryId方法的典型用法代碼示例。如果您正苦於以下問題:PHP learnpath::setCategoryId方法的具體用法?PHP learnpath::setCategoryId怎麽用?PHP learnpath::setCategoryId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類learnpath
的用法示例。
在下文中一共展示了learnpath::setCategoryId方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isset
$learnPath->set_hide_toc_frame($hide_toc_frame);
$learnPath->set_prerequisite($_REQUEST['prerequisites']);
$learnPath->set_use_max_score($_REQUEST['use_max_score']);
$subscribers = isset($_REQUEST['subscribe_users']) ? $_REQUEST['subscribe_users'] : '';
$learnPath->setSubscribeUsers($subscribers);
if (isset($_REQUEST['activate_start_date_check']) && $_REQUEST['activate_start_date_check'] == 1) {
$publicated_on = $_REQUEST['publicated_on'];
} else {
$publicated_on = null;
}
if (isset($_REQUEST['activate_end_date_check']) && $_REQUEST['activate_end_date_check'] == 1) {
$expired_on = $_REQUEST['expired_on'];
} else {
$expired_on = null;
}
$learnPath->setCategoryId($_REQUEST['category_id']);
$learnPath->set_modified_on();
$learnPath->set_publicated_on($publicated_on);
$learnPath->set_expired_on($expired_on);
if (isset($_REQUEST['remove_picture']) && $_REQUEST['remove_picture']) {
$learnPath->delete_lp_image();
}
$extraFieldValue = new ExtraFieldValue('lp');
$params = array('lp_id' => $learnPath->id);
$extraFieldValue->saveFieldValues($_REQUEST);
if ($_FILES['lp_preview_image']['size'] > 0) {
$learnPath->upload_image($_FILES['lp_preview_image']);
}
if (api_get_setting('search.search_enabled') === 'true') {
require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php';
$specific_fields = get_specific_field_list();