Exemple #1
0
 /**
  * Restores object from trash can.
  * @param int $restoredBy Id of user (or SystemUser::SYSTEM_USER_ID).
  * @return bool
  */
 public function restore($restoredBy)
 {
     $this->errorCollection->clear();
     $needRecalculate = $this->deletedType == ObjectTable::DELETED_TYPE_CHILD;
     $status = parent::restoreNonRecursive($restoredBy);
     if ($status && $needRecalculate) {
         $this->recalculateDeletedTypeAfterRestore($restoredBy);
     }
     if ($status) {
         Driver::getInstance()->sendChangeStatusToSubscribers($this);
     }
     return $status;
 }