Пример #1
0
 /**
  * Deletes folder and all descendants objects.
  * @param int $deletedBy Id of user (or SystemUser::SYSTEM_USER_ID).
  * @throws \Bitrix\Main\ArgumentException
  * @throws \Bitrix\Main\ArgumentNullException
  * @return bool
  */
 public function deleteTree($deletedBy)
 {
     /** @var Sharing $sharing */
     $sharing = Sharing::load(array('LINK_OBJECT_ID' => $this->getId()));
     if ($sharing) {
         $sharing->decline($deletedBy, false);
     }
     return parent::deleteNonRecursive($deletedBy);
 }