Esempio n. 1
0
     break;
 case \common\components\EEvent::POST_DELETE():
     $icon = "fa-pencil";
     $color = "bg-lime";
     $userConnected = $event->getConnectedUser();
     if ($userConnected != null) {
         if ($event->getConnectedData()->self_mode) {
             $content = "<a href='/user/" . $event->getEventOwner()->getUsername() . "'>" . Yii::t('app', 'You') . "</a>&nbsp" . Yii::t('app', "have deleted a post from") . "<a href='/user/" . $userConnected->getUsername() . "'> " . $userConnected->getFullName() . Yii::t('app', '\'s profile') . " </a>";
         } else {
             $content = "<a href='/user/" . $userConnected->getUsername() . "'>" . $userConnected->getFullName() . "</a>&nbsp" . Yii::t('app', "has deleted his post from your profile");
         }
     } else {
         $content = "<a href='/user/" . $event->getEventOwner()->getUsername() . "'>" . Yii::t('app', 'You') . "</a>&nbsp" . Yii::t('app', 'have deleted a post from your profile');
     }
     break;
 case \common\components\EEvent::POST_EDIT():
     $icon = "fa-pencil";
     $color = "bg-maroon";
     $userConnected = $event->getConnectedUser();
     if ($userConnected != null) {
         if ($event->getConnectedData()->self_mode) {
             $content = "<a href='/user/" . $event->getEventOwner()->getUsername() . "'>" . Yii::t('app', 'You') . "</a>&nbsp" . Yii::t('app', "have edited your post from") . "<a href='/user/" . $userConnected->getUsername() . "'> " . $userConnected->getFullName() . Yii::t('app', '\'s profile') . " </a>";
         } else {
             $content = "<a href='/user/" . $userConnected->getUsername() . "'>" . $userConnected->getFullName() . "</a>&nbsp" . Yii::t('app', "has edited his post at your profile");
         }
     } else {
         $content = "<a href='/user/" . $event->getEventOwner()->getUsername() . "'>" . Yii::t('app', 'You') . "</a>&nbsp" . Yii::t('app', 'have edited a post from your profile');
     }
     break;
 case \common\components\EEvent::POST_LIKED():
     $icon = "fa-pencil";