예제 #1
0
파일: data.php 프로젝트: samj1912/repo
 /**
  * @param \OCP\IL10N $l
  * @return array Array "stringID of the type" => "translated string description for the setting"
  */
 public function getNotificationTypes(\OCP\IL10N $l)
 {
     if (isset($this->notificationTypes[$l->getLanguageCode()])) {
         return $this->notificationTypes[$l->getLanguageCode()];
     }
     // Allow apps to add new notification types
     $notificationTypes = $this->activityManager->getNotificationTypes($l->getLanguageCode());
     $this->notificationTypes[$l->getLanguageCode()] = $notificationTypes;
     return $notificationTypes;
 }
예제 #2
0
 /**
  * @param \OCP\IL10N $l
  * @return array Array "stringID of the type" => "translated string description for the setting"
  */
 public function getNotificationTypes(\OCP\IL10N $l)
 {
     if (isset($this->notificationTypes[$l->getLanguageCode()])) {
         return $this->notificationTypes[$l->getLanguageCode()];
     }
     $notificationTypes = array(self::TYPE_SHARED => $l->t('A file or folder has been <strong>shared</strong>'), self::TYPE_SHARE_CREATED => $l->t('A new file or folder has been <strong>created</strong>'), self::TYPE_SHARE_CHANGED => $l->t('A file or folder has been <strong>changed</strong>'), self::TYPE_SHARE_DELETED => $l->t('A file or folder has been <strong>deleted</strong>'), self::TYPE_SHARE_RESTORED => $l->t('A file or folder has been <strong>restored</strong>'));
     // Allow other apps to add new notification types
     $additionalNotificationTypes = $this->activityManager->getNotificationTypes($l->getLanguageCode());
     $notificationTypes = array_merge($notificationTypes, $additionalNotificationTypes);
     $this->notificationTypes[$l->getLanguageCode()] = $notificationTypes;
     return $notificationTypes;
 }