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") .
198 public static function exists($a_id, $a_lang)
202 $ilDB = $DIC->database();
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)
225 $ilDB = $DIC->database();
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"]);
getShortTitle()
Get short title.
setShortTitle($a_val)
Set short title.
getCreateDate()
Get create date.
if(!array_key_exists('StateId', $_REQUEST)) $id
static exists($a_id, $a_lang)
Check for existence.
setTitle($a_val)
Set title.
Translation information on lm object.
__construct($a_id=0, $a_lang="")
Constructor.
static copy($a_source_id, $a_target_id)
Copy all translations of an object.
save()
Save (inserts if not existing, otherwise updates)
getLastUpdate()
Get update date.