getLastNotification() 공개 메소드

Get last notification of the current entity.
public getLastNotification ( $toId, $entity, Closur\Closure $filterScope = null ) : mixed
$toId
$entity
$filterScope Closur\Closure
리턴 mixed
 /**
  * Get last notification of the
  * given entity
  *
  * @param         $to_id
  * @param Closure $filterScope
  * @return mixed
  */
 public function getLastNotification($to_id, Closure $filterScope = null)
 {
     return $this->notifynderRepo->getLastNotification($to_id, $this->entity, $filterScope);
 }
예제 #2
0
 /** @test */
 public function it_get_last_notification_of_the_current_entity(NotificationDB $notificationRepo)
 {
     $id = 1;
     $notificationRepo->getLastNotification($id, null, null)->shouldBeCalled()->willReturn(new Notification());
     $this->getLastNotification($id)->shouldReturnAnInstanceOf(Notification::class);
 }
 /**
  * Get last notification of the
  * given entity
  *
  * @param $to_id
  * @return mixed
  */
 public function getLastNotification($to_id)
 {
     return $this->notifynderRepo->getLastNotification($to_id, $this->entity);
 }