Exemple #1
0
 public function delete()
 {
     $this->load();
     if (!strlen($this->getAccountId())) {
         throw new Gpf_Exception($this->_('Default role can not be deleted!'));
     }
     return parent::delete();
 }
 public function delete($filterId)
 {
     $this->set('filterid', $filterId);
     $this->load();
     if ($this->getPreset() == Gpf::YES) {
         throw new Gpf_Exception("You cannot delete preset filter!");
     }
     $conditionsTable = Gpf_Db_Table_FilterConditions::getInstance();
     $conditionsTable->deleteAll($filterId);
     return parent::delete();
 }
 /**
  * Deletes row. Primary key value must be set before this function is called
  */
 public function delete()
 {
     if ($this->isPrimaryKeyEmpty()) {
         throw new Gpf_Exception("Could not delete Row. Primary key values are empty");
     }
     $this->load();
     if ($this->getFileId() != "") {
         try {
             $file = new Gpf_Db_File();
             $file->setFileId($this->getFileId());
             $file->removeReference();
         } catch (Gpf_DbEngine_Driver_Mysql_SqlException $e) {
         }
     }
     return parent::delete();
 }
Exemple #4
0
 public function delete()
 {
     if (Gpf_Application::isDemo() && Gpf_Application::isDemoEntryId($this->getId())) {
         throw new Gpf_Exception("Demo banner can not be deleted");
     }
     return parent::delete();
 }
Exemple #5
0
 /**
  * Deletes row. Primary key value must be set before this function is called
  */
 public function delete()
 {
     $this->load();
     if ($this->getReferenced() > 0) {
         return;
     }
     parent::delete();
 }
Exemple #6
0
 public function delete()
 {
     $this->load();
     if ($this->isDefault()) {
         throw new Gpf_Exception($this->_("Default language can't be deleted"));
     }
     $returnValue = parent::delete();
     $this->deleteLanguageFilesFromAccount();
     return $returnValue;
 }
 public function delete()
 {
     parent::delete();
     Gpf_Db_Table_GadgetProperties::deleteAll($this->getId());
 }
 protected function deleteRow(Gpf_DbEngine_Row $row)
 {
     $row->load();
     $row->delete();
 }