/** * Return name of storage. * @return string */ public function getTitle() { $entityId = $this->storage->getEntityId(); if ($entityId == 'shared_files_s1' || $entityId == 'shared_files' || $entityId == 'shared') { return Loc::getMessage('DISK_PROXY_TYPE_COMMON_TITLE_S1'); } return parent::getTitle(); }
/** * Return name of storage. * May be concrete by current user context. * Should not use in notification, email to another person. * @return string */ public function getTitleForCurrentUser() { global $USER; if (is_object($USER) && $USER->getId() == $this->entityId) { return Loc::getMessage('DISK_PROXY_TYPE_USER_TITLE_CURRENT_USER'); } return parent::getTitle(); }