43 $this->db->manipulateF(
44 'UPDATE content_object SET stylesheet = %s WHERE id = %s',
45 [
'integer',
'integer'],
55 protected function doCloneObject($new_obj, $a_target_id, $a_copy_id =
null)
58 parent::doCloneObject($new_obj, $a_target_id, $a_copy_id);
61 $originalPageObject = new \ilContentPagePage($this->
getId());
62 $copiedXML = $originalPageObject->copyXmlContent();
64 $duplicatePageObject = new \ilContentPagePage();
65 $duplicatePageObject->setId($new_obj->getId());
66 $duplicatePageObject->setParentId($new_obj->getId());
67 $duplicatePageObject->setXMLContent($copiedXML);
68 $duplicatePageObject->createFromXML();
75 $new_id = $style->ilClone();
76 $new_obj->setStyleSheetId($new_id);
92 $lpSettings->cloneSettings($new_obj->getId());
102 $res = $this->db->queryF(
103 'SELECT * FROM content_page_data WHERE content_page_id = %s',
108 while (
$data = $this->db->fetchAssoc(
$res)) {
120 $this->db->manipulateF(
122 INSERT INTO content_page_data
128 [
'integer',
'integer'],
141 $this->db->manipulateF(
143 UPDATE content_page_data
146 WHERE content_page_id = %s',
147 [
'integer',
'integer'],
160 $originalPageObject = new \ilContentPagePage($this->
getId());
161 $originalPageObject->delete();
172 $sql =
"SELECT page_id FROM page_object WHERE parent_id = %s AND parent_type = %s";
173 $res = $this->db->queryF(
179 while ($row = $this->db->fetchAssoc(
$res)) {
180 $pageObjIds[] = $row[
'page_id'];
An exception for terminatinating execution or to throw for unit testing.
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static _writeContainerSetting($a_id, $a_keyword, $a_value)
const LP_MODE_CONTENT_VISITED
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
const LP_STATUS_COMPLETED_NUM
static _lookupStatus($a_obj_id, $a_user_id, $a_create=true)
Lookup status.
writeStyleSheetId(int $styleId)
setStyleSheetId(int $styleId)
trackProgress(int $usrId)
static _lookupStandard($a_id)
Lookup standard flag.
Class ilObject2 This is an intermediate progress of ilObject class.
getRefId()
get reference id @access public
getType()
get object type @access public
doCloneObject($new_obj, $a_target_id, $a_copy_id=null)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static getInstance($a_obj_id)
const INFO_TAB_VISIBILITY
getId()
get object id @access public
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
Interface ilContentPageObjectConstants.
foreach($_POST as $key=> $value) $res