4 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
32 public function update($a_validate =
true, $a_no_history =
false)
57 public function delete()
82 $ilDB = $DIC->database();
101 public static function exists($a_media_pool_id, $a_title)
105 $ilDB = $DIC->database();
129 $ilDB = $DIC->database();
131 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
147 $ilDB = $DIC->database();
169 return self::lookupUsages($this->
getId(), $a_incl_hist);
181 $ilDB = $DIC->database();
184 $q =
"SELECT * FROM page_pc_usage WHERE pc_id = " .
185 $ilDB->quote($a_id,
"integer") .
186 " AND pc_type = " .
$ilDB->quote(
"incl",
"text");
189 $q.=
" AND usage_hist_nr = " .
$ilDB->quote(0,
"integer");
192 $us_set =
$ilDB->query($q);
194 while ($us_rec =
$ilDB->fetchAssoc($us_set)) {
196 if (is_int(strpos($us_rec[
"usage_type"],
":"))) {
197 $us_arr = explode(
":", $us_rec[
"usage_type"]);
205 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
212 $ret[] =
array(
"type" => $us_rec[
"usage_type"],
213 "id" => $us_rec[
"usage_id"],
214 "hist_nr" => $us_rec[
"usage_hist_nr"]);
219 $q =
"SELECT DISTINCT mep_id FROM mep_tree JOIN mep_item ON (child = obj_id) WHERE mep_item.obj_id = " .
220 $ilDB->quote($a_id,
"integer") .
" AND mep_item.type = " .
$ilDB->quote(
"pg",
"text");
221 $us_set =
$ilDB->query($q);
222 while ($us_rec =
$ilDB->fetchAssoc($us_set)) {
224 "id" => $us_rec[
"mep_id"]);
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
static _mediaPoolPageExists($a_media_pool_id, $a_title)
Check whether page exists in media pool or not.
static lookupTitle($a_page_id)
Lookup title.
read()
Read media_pool data.
static deleteAllPagesOfMediaPool($a_media_pool_id)
delete media pool page and al related data
update($a_validate=true, $a_no_history=false)
update object data
getUsages($a_incl_hist=true)
get all usages of current media object
static lookupUsages($a_id, $a_incl_hist=true)
Lookup usages of media object.
Create styles array
The data for the language used.
getParentType()
Get parent type.
update($pash, $contents, Config $config)
static exists($a_media_pool_id, $a_title)
Checks whether a page with given title exists.