move() public method

Move the specified message from the current folder into a new folder.
public move ( string $object_id, string $new_folder ) : null
$object_id string ID of the message to be moved.
$new_folder string Target folder.
return null
Example #1
0
 /**
  * Moves an event to a new calendar.
  *
  * @param string $eventId      The event to move.
  * @param string $newCalendar  The new calendar.
  *
  * @return Kronolith_Event  The old event.
  * @throws Kronolith_Exception
  * @throws Horde_Exception_NotFound
  */
 protected function _move($eventId, $newCalendar)
 {
     $event = $this->getEvent($eventId);
     $target = $GLOBALS['injector']->getInstance('Kronolith_Shares')->getShare($newCalendar)->get('folder');
     $this->_data->move($event->uid, $target);
     unset($this->_events_cache[$eventId]);
     try {
         $this->_kolab->getData($target, 'event')->synchronize();
     } catch (Kolab_Storage_Exception $e) {
         throw new Kronolith_Exception($e);
     }
     if (is_callable('Kolab', 'triggerFreeBusyUpdate')) {
         //Kolab::triggerFreeBusyUpdate($this->_data->parseFolder($this->calendar));
         //Kolab::triggerFreeBusyUpdate($this->_data->parseFolder($newCalendar));
     }
     return $event;
 }
Example #2
0
File: Log.php Project: horde/horde
 /**
  * Move the specified message from the current folder into a new
  * folder.
  *
  * @param string $object_id  ID of the message to be moved.
  * @param string $new_folder Target folder.
  *
  * @return NULL
  */
 public function move($object_id, $new_folder)
 {
     $this->_logger->debug(sprintf('Moving data object %s in %s to %s.', $object_id, $this->_data->getPath(), $new_folder));
     $this->_data->move($object_id, $new_folder);
     $this->_logger->debug(sprintf('Moved data object %s in %s to %s.', $object_id, $this->_data->getPath(), $new_folder));
 }