Esempio n. 1
0
 /** delete project
  * this method deletes the project
  */
 function delete()
 {
     parent::delete();
     // delete in community rooms
     $com_list = $this->getCommunityList();
     if (isset($com_list) and is_object($com_list) and $com_list->isNotEmpty()) {
         $com_item = $com_list->getFirst();
         while ($com_item) {
             $com_item->removeProjectID2InternalProjectIDArray($this->getItemID());
             $com_item->saveWithoutChangingModificationInformation();
             unset($com_item);
             $com_item = $com_list->getNext();
         }
     }
     unset($com_list);
     // delete associated tasks
     $task_list = $this->_getTaskList();
     $current_task = $task_list->getFirst();
     while ($current_task) {
         $current_task->delete();
         unset($current_task);
         $current_task = $task_list->getNext();
     }
     unset($task_list);
     // send mail to moderation
     $this->_sendMailRoomDelete();
     $manager = $this->_environment->getProjectManager();
     $this->_delete($manager);
     unset($manager);
     if ($this->_environment->inPortal()) {
         $id_manager = $this->_environment->getExternalIdManager();
         $id_manager->deleteByCommSyID($this->getItemID());
         unset($id_manager);
     }
     // sync count room redundancy
     $current_portal_item = $this->getContextItem();
     if ($current_portal_item->isCountRoomRedundancy()) {
         $current_portal_item->syncCountProjectRoomRedundancy(true);
     }
     unset($current_portal_item);
 }
Esempio n. 2
0
 /** delete community
  * this method deletes the community
  */
 function delete()
 {
     parent::delete();
     // send mail to moderation
     $this->_sendMailRoomDelete();
     $manager = $this->_environment->getCommunityManager();
     $this->_delete($manager);
     // sync count room redundancy
     $current_portal_item = $this->getContextItem();
     if ($current_portal_item->isCountRoomRedundancy()) {
         $current_portal_item->syncCountCommunityRoomRedundancy(true);
     }
     unset($current_portal_item);
 }
Esempio n. 3
0
 /** delete project
  * this method deletes the group room
  */
 public function delete()
 {
     parent::delete();
     // delete associated tasks
     $task_list = $this->_getTaskList();
     $current_task = $task_list->getFirst();
     while ($current_task) {
         $current_task->delete();
         $current_task = $task_list->getNext();
     }
     // send mail to moderation
     $this->_sendMailRoomDelete();
     $manager = $this->_environment->getProjectManager();
     $this->_delete($manager);
     // sync count room redundancy
     $current_portal_item = $this->getContextItem();
     if ($current_portal_item->isCountRoomRedundancy()) {
         $current_portal_item->syncCountGroupRoomRedundancy(true);
     }
     unset($current_portal_item);
 }