35 if ($this->
getId() > 0 &&
null === $this->objTrans) {
88 $this->db->manipulateF(
89 'UPDATE content_object SET stylesheet = %s WHERE id = %s',
90 [
'integer',
'integer'],
100 protected function doCloneObject($new_obj, $a_target_id, $a_copy_id =
null)
103 parent::doCloneObject($new_obj, $a_target_id, $a_copy_id);
106 $ot->copy($new_obj->getId());
110 foreach ($translations as $language) {
112 $copiedXML = $originalPageObject->copyXmlContent();
115 $duplicatePageObject->setId($new_obj->getId());
116 $duplicatePageObject->setParentId($new_obj->getId());
117 $duplicatePageObject->setLanguage($language);
118 $duplicatePageObject->setXMLContent($copiedXML);
119 $duplicatePageObject->createFromXML();
121 $this->pageMetricsService->store(
123 (
int) $new_obj->getId(),
124 $duplicatePageObject->getLanguage()
134 $new_id = $style->ilClone();
135 $new_obj->setStyleSheetId($new_id);
151 $lpSettings->cloneSettings($new_obj->getId());
163 $res = $this->db->queryF(
164 'SELECT * FROM content_page_data WHERE content_page_id = %s',
169 while (
$data = $this->db->fetchAssoc(
$res)) {
183 $this->db->manipulateF(
185 INSERT INTO content_page_data
191 [
'integer',
'integer'],
207 $trans->setDefaultTitle($this->
getTitle());
211 $this->db->manipulateF(
213 UPDATE content_page_data
216 WHERE content_page_id = %s',
217 [
'integer',
'integer'],
231 $originalPageObject->delete();
235 $this->objTrans->delete();
237 $this->db->manipulateF(
238 'DELETE FROM content_page_metrics WHERE content_page_id = %s',
243 $this->db->manipulateF(
244 'DELETE FROM content_page_data WHERE content_page_id = %s',
257 $sql =
"SELECT DISTINCT page_id FROM page_object WHERE parent_id = %s AND parent_type = %s";
258 $res = $this->db->queryF(
264 while ($row = $this->db->fetchAssoc(
$res)) {
265 $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)
__construct($a_id=0, $a_reference=true)
@inheritDoc
setStyleSheetId(int $styleId)
trackProgress(int $usrId)
initPageMetricsService(ILIAS\Refinery\Factory $refinery)
static _lookupStandard($a_id)
Lookup standard flag.
Class ilObject2 This is an intermediate progress of ilObject class.
getRefId()
get reference id @access public
getLongDescription()
get object long description (stored in object_description)
getType()
get object type @access public
getTitle()
get object title @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
Class handles translation mode for an object.
static getInstance($a_obj_id)
Get instance.
getId()
get object id @access public
static lookupTranslations($a_parent_type, $a_id)
Lookup translations.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
Interface ilContentPageObjectConstants.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ChatMainBarProvider \MainMenu\Provider.
foreach($_POST as $key=> $value) $res