Esempio n. 1
0
 /**
  * function updateDBTable
  * <pre>
  * Updates the DB table info.
  * </pre>
  * @return [void]
  */
 function updateDBTable()
 {
     // make sure label is translated into UnicodeEntities
     $data = $this->getLabel();
     $newData = Unicode_utf8ToUnicodeEntities($data);
     $this->setLabel($newData);
     parent::updateDBTable();
     // Go Through and remove any existing xlation requests for this
     // label entry.
     $currentPageID = $this->getPageID();
     $currentKey = $this->getKey();
     $currentLanguageID = $this->getLanguageID();
     $xlationManager = new RowManager_XLationManager();
     // for each label with matching PageID & Key
     $labelManager = new RowManager_MultilingualLabelManager();
     $labelManager->setPageID($currentPageID);
     $labelManager->setKey($currentKey);
     $labelList = $labelManager->getListIterator();
     $labelList->setFirst();
     while ($label = $labelList->getNext()) {
         // delete any xlation entry with current language_id &
         // matching label_id
         if ($xlationManager->loadByLabelAndLanguage($label->getID(), $currentLanguageID)) {
             $xlationManager->deleteEntry();
         }
     }
     // next label
 }