58 $this->logger =
$GLOBALS[
'DIC']->logger()->meta();
59 $this->db =
$GLOBALS[
'DIC']->database();
60 $this->entry_id = $a_entry_id;
75 $query =
"SELECT entry_id FROM il_md_cpr_selections ";
81 return $entries ? $entries :
array();
93 if(!
$entry_id = self::_extractEntryId($a_cp_string))
98 $query =
"SELECT title FROM il_md_cpr_selections ".
99 "WHERE entry_id = ".$ilDB->quote(
$entry_id).
" ";
102 return $row->title ?
$row->title :
'';
118 if(!
$entry_id = self::_extractEntryId($a_cp_string))
123 $query =
"SELECT copyright FROM il_md_cpr_selections ".
124 "WHERE entry_id = ".$ilDB->quote(
$entry_id).
" ";
127 return $row->copyright ?
$row->copyright :
'';
140 if(!preg_match(
'/il_copyright_entry__([0-9]+)__([0-9]+)/',$a_cp_string,$matches))
144 if($matches[1] != IL_INST_ID)
148 return $matches[2] ? $matches[2] : 0;
184 $this->title = $a_title;
207 $this->description = $a_desc;
217 return $this->description;
229 $this->copyright = $a_copyright;
251 $this->costs = $a_costs;
295 $this->copyright_and_other_restrictions = $a_status;
320 $next_id = $ilDB->nextId(
'il_md_cpr_selections');
322 $ilDB->insert(
'il_md_cpr_selections',
array(
323 'entry_id' =>
array(
'integer',$next_id),
331 $this->entry_id = $next_id;
345 $ilDB->update(
'il_md_cpr_selections',
array(
364 public function delete()
368 $query =
"DELETE FROM il_md_cpr_selections ".
369 "WHERE entry_id = ".$this->db->quote($this->
getEntryId() ,
'integer').
" ";
401 $query =
"SELECT * FROM il_md_cpr_selections ".
402 "WHERE entry_id = ".$this->db->quote($this->entry_id ,
'integer').
" ";
415 $query =
"SELECT count(meta_rights_id) used FROM il_meta_rights ".
416 "WHERE description = ".$ilDB->quote(
'il_copyright_entry__'.IL_INST_ID.
'__'.$this->getEntryId(),
'text');
418 $this->logger->debug(
$query);
getLanguage()
get language
static _getEntries()
get entries
setLanguage($a_lang_key)
set language
setCosts($a_costs)
set costs
setDescription($a_desc)
set description
getCopyrightAndOtherRestrictions()
get copyright and other restrictions
getCopyright()
get copyright
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setCopyrightAndOtherRestrictions($a_status)
set copyright and other restrictions
static _extractEntryId($a_cp_string)
extract entry id
__construct($a_entry_id)
Constructor.
static _lookupCopyright($a_cp_string)
lookup copyright by entry id
getDescription()
get description
Create styles array
The data for the language used.
setTitle($a_title)
set title
static lookupCopyyrightTitle($a_cp_string)
Lookup copyright title.
$copyright_and_other_restrictions
setCopyright($a_copyright)
set copyright