public function addNotification($notification)
    {
        $this->_mixer->getRepository()
        ->registerCallback('before.update', array($this, 'resetStats'), array($this->_mixer));

        $this->_mixer->getRepository()
        ->registerCallback('before.update', array($this, 'removeOldNotifications'), array($this->_mixer));

        $ids = clone $this->notificationIds;
        $ids[] = $notification->id;
        $this->set('notificationIds', $ids);

        $ids = clone $this->newNotificationIds;
        $ids[] = $notification->id;
        $this->set('newNotificationIds', $ids);
    }
public function addNotification($notification)
    {
        $this->_mixer->getRepository()
        ->registerCallback('before.update', array($this, 'resetStats'), array($this->_mixer));

        $this->_mixer->getRepository()
        ->registerCallback('before.update', array($this, 'removeOldNotifications'), array($this->_mixer));

        $ids = clone $this->notificationIds;
        $ids[] = $notification->id;
        $this->set('notificationIds', $ids);

        $ids = clone $this->newNotificationIds;
        $ids[] = $notification->id;
        $this->set('newNotificationIds', $ids);
    }
public function addNotification ( $ notification ) { $ this -> _mixer -> getRepository ( ) -> registerCallback ( 'before.update' , array ( $ this , 'resetStats' ) , array ( $ this -> _mixer ) ) ; $ this -> _mixer -> getRepository ( ) -> registerCallback ( 'before.update' , array ( $ this , 'removeOldNotifications' ) , array ( $ this -> _mixer ) ) ; $ ids = clone $ this -> notificationIds ; $ ids [ ] = $ notification -> id ; $ this -> set ( 'notificationIds' , $ ids ) ; $ ids = clone $ this -> newNotificationIds ; $ ids [ ] = $ notification -> id ; $ this -> set ( 'newNotificationIds' , $ ids ) ; }
Adds a new notification for the actor.

@param ComNotificationsDomainEntityNotification $notification Notification
Adds a new notification for the actor .