35        $this->db = 
$DIC->database();
 
   36        if ($a_id > 0 && $a_lang != 
"") {
 
   90        $this->title = $a_val;
 
  110        $this->short_title = $a_val;
 
  151            "SELECT * FROM lm_data_transl " .
 
  152            " WHERE id = " . 
$ilDB->quote($this->getId(), 
"integer") .
 
  153            " AND lang = " . 
$ilDB->quote($this->getLang(), 
"text")
 
  155        $rec = 
$ilDB->fetchAssoc($set);
 
  158        $this->create_date = $rec[
"create_date"];
 
  159        $this->last_update = $rec[
"last_update"];
 
  170            $ilDB->manipulate(
"INSERT INTO lm_data_transl " .
 
  171                "(id, lang, title, short_title, create_date, last_update) VALUES (" .
 
  172                $ilDB->quote($this->getId(), 
"integer") . 
"," .
 
  173                $ilDB->quote($this->getLang(), 
"text") . 
"," .
 
  174                $ilDB->quote($this->getTitle(), 
"text") . 
"," .
 
  175                $ilDB->quote($this->getShortTitle(), 
"text") . 
"," .
 
  181                "UPDATE lm_data_transl SET " .
 
  182                " title = " . 
$ilDB->quote($this->getTitle(), 
"text") . 
"," .
 
  183                " short_title = " . 
$ilDB->quote($this->getShortTitle(), 
"text") . 
"," .
 
  184                " last_update = " . 
$ilDB->now() .
 
  185                " WHERE id = " . 
$ilDB->quote($this->getId(), 
"integer") .
 
  186                " AND lang = " . 
$ilDB->quote($this->getLang(), 
"text")
 
  198    public static function exists($a_id, $a_lang)
 
  205            "SELECT * FROM lm_data_transl " .
 
  206            " WHERE id = " . 
$ilDB->quote($a_id, 
"integer") .
 
  207            " AND lang = " . 
$ilDB->quote($a_lang, 
"text")
 
  209        if ($rec = 
$ilDB->fetchAssoc($set)) {
 
  221    public static function copy($a_source_id, $a_target_id)
 
  228            "SELECT * FROM lm_data_transl " .
 
  229            " WHERE id = " . 
$ilDB->quote($a_source_id, 
"integer")
 
  231        while ($rec = 
$ilDB->fetchAssoc($set)) {
 
  233            $lmobjtrans->setTitle($rec[
"title"]);
 
  234            $lmobjtrans->setShortTitle($rec[
"short_title"]);
 
An exception for terminatinating execution or to throw for unit testing.
Translation information on lm object.
static copy($a_source_id, $a_target_id)
Copy all translations of an object.
setShortTitle($a_val)
Set short title.
getShortTitle()
Get short title.
setTitle($a_val)
Set title.
static exists($a_id, $a_lang)
Check for existence.
getCreateDate()
Get create date.
getLastUpdate()
Get update date.
__construct($a_id=0, $a_lang="")
Constructor.
save()
Save (inserts if not existing, otherwise updates)