/** * @param BaseObject $object * @return string */ private function getUfEntityName(BaseObject $object) { if ($object instanceof File) { return 'DISK_FILE_' . $object->getStorageId(); } return 'DISK_FOLDER_' . $object->getStorageId(); }
private function checkUseInternalsRightsOnStorage(BaseObject $object, $rights) { $storageModel = Storage::loadById($object->getStorageId()); if (!empty($rights) && !$storageModel->isUseInternalRights()) { throw new SystemException('Attempt to set the rights, but not to use the internal rights.'); } }