40            include_once(
"./Services/COPage/exceptions/class.ilCOPageException.php");
 
   45            include_once(
"./Services/COPage/exceptions/class.ilCOPageException.php");
 
   59        $this->parent_type = $a_val;
 
   79        $this->parent_id = $a_val;
 
   99        $this->master_lang = $a_val;
 
  119        $this->languages = $a_val;
 
  139        if ($a_lang != 
"" && !in_array($a_lang, $this->languages)) {
 
  140            $this->languages[] = $a_lang;
 
  152        $this->activated = $a_val;
 
  170        $set = $this->db->query(
 
  171            "SELECT * FROM copg_multilang " .
 
  172            " WHERE parent_type = " . $this->db->quote($this->getParentType(), 
"text") .
 
  173            " AND parent_id = " . $this->db->quote($this->getParentId(), 
"integer")
 
  175        if ($rec = $this->db->fetchAssoc($set)) {
 
  183        $set = $this->db->query(
 
  184            "SELECT * FROM copg_multilang_lang " .
 
  185            " WHERE parent_type = " . $this->db->quote($this->getParentType(), 
"text") .
 
  186            " AND parent_id = " . $this->db->quote($this->getParentId(), 
"integer")
 
  188        while ($rec = $this->db->fetchAssoc($set)) {
 
  196    public function delete()
 
  198        $this->db->manipulate(
 
  199            "DELETE FROM copg_multilang " .
 
  200            " WHERE parent_type = " . $this->db->quote($this->getParentType(), 
"text") .
 
  201            " AND parent_id = " . $this->db->quote($this->
getParentId(), 
"integer")
 
  203        $this->db->manipulate(
 
  204            "DELETE FROM copg_multilang_lang " .
 
  205            " WHERE parent_type = " . $this->db->quote($this->getParentType(), 
"text") .
 
  206            " AND parent_id = " . $this->db->quote($this->
getParentId(), 
"integer")
 
  217        $this->db->manipulate(
"INSERT INTO copg_multilang " .
 
  218            "(parent_type, parent_id, master_lang) VALUES (" .
 
  219            $this->db->quote($this->getParentType(), 
"text") . 
"," .
 
  220            $this->db->quote($this->
getParentId(), 
"integer") . 
"," .
 
  225            $this->db->manipulate(
"INSERT INTO copg_multilang_lang " .
 
  226                "(parent_type, parent_id, lang) VALUES (" .
 
  227                $this->db->quote($this->getParentType(), 
"text") . 
"," .
 
  228                $this->db->quote($this->
getParentId(), 
"integer") . 
"," .
 
  229                $this->db->quote(
$lang, 
"text") .
 
  241    public function copy($a_target_parent_type, $a_target_parent_id)
 
  244            $target_ml = 
new ilPageMultiLang($a_target_parent_type, $a_target_parent_id);
 
An exception for terminatinating execution or to throw for unit testing.
Base exception class for copage service.
Multi-language properties.
getLanguages()
Get languages.
setParentId($a_val)
Set parent id.
setActivated($a_val)
Set activated.
copy($a_target_parent_type, $a_target_parent_id)
Copy multilinguality settings.
setLanguages(array $a_val)
Set languages.
getParentType()
Get parent type.
getMasterLanguage()
Get master language.
addLanguage($a_lang)
Add language.
getParentId()
Get parent id.
setMasterLanguage($a_val)
Set master language.
__construct($a_parent_type, $a_parent_id)
Constructor.
setParentType($a_val)
Set parent type.
getActivated()
Get activated.
getEffectiveLang($a_lang)
Get effective language for given language.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.