Allow to remove observer by it's identifier
authorMichael Spahn <m.spahn@metaways.de>
Mon, 17 Jul 2017 18:50:17 +0000 (20:50 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 17 Jul 2017 18:54:37 +0000 (20:54 +0200)
Change-Id: I4294f36e01ec68a397900f6b7c02598fd3dbb736
Reviewed-on: http://gerrit.tine20.com/customers/5229
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Record/PersistentObserver.php

index b74f6bd..dae2674 100644 (file)
@@ -170,6 +170,21 @@ class Tinebase_Record_PersistentObserver
     }
 
     /**
+     * Remove observer by it's identifier
+     *
+     * @param $identifier
+     */
+    public function removeObserverByIdentifier($identifier)
+    {
+        $where = array(
+            $this->_db->quoteIdentifier('observer_identifier') . ' = ' . $this->_db->quote($identifier)
+        );
+
+        $this->_table->delete($where);
+    }
+
+
+    /**
      * unregisters all observables of a given observer 
      * 
      * @param Tinebase_Record_Interface $_observer