public function renderNotifications(NotifiableInterface $notifiable, array $options)
    {
        $order = array_key_exists('order', $options) ? $options['order'] : null;
        $limit = array_key_exists('limit', $options) ? $options['limit'] : null;
        $offset = array_key_exists('offset', $options) ? $options['offset'] : null;

        if ($options['seen']) {
            $notifications = $this->notificationManager->getNotifications($notifiable, $order, $limit, $offset);
        } else {
            $notifications = $this->notificationManager->getUnseenNotifications($notifiable, $order, $limit, $offset);
        }

        // if the template option is set, use custom template
        $template = array_key_exists('template', $options) ? $options['template'] : '@MgiletNotification/notification_list.html.twig';

        return $this->twig->render($template,
            array(
                'notificationList' => $notifications
            )
        );
    }
public function renderNotifications(NotifiableInterface $notifiable, array $options)
    {
        $order = array_key_exists('order', $options) ? $options['order'] : null;
        $limit = array_key_exists('limit', $options) ? $options['limit'] : null;
        $offset = array_key_exists('offset', $options) ? $options['offset'] : null;

        if ($options['seen']) {
            $notifications = $this->notificationManager->getNotifications($notifiable, $order, $limit, $offset);
        } else {
            $notifications = $this->notificationManager->getUnseenNotifications($notifiable, $order, $limit, $offset);
        }

        // if the template option is set, use custom template
        $template = array_key_exists('template', $options) ? $options['template'] : '@MgiletNotification/notification_list.html.twig';

        return $this->twig->render($template,
            array(
                'notificationList' => $notifications
            )
        );
    }
public function renderNotifications ( NotifiableInterface $ notifiable , array $ options ) { $ order = array_key_exists ( 'order' , $ options ) ? $ options [ 'order' ] : null ; $ limit = array_key_exists ( 'limit' , $ options ) ? $ options [ 'limit' ] : null ; $ offset = array_key_exists ( 'offset' , $ options ) ? $ options [ 'offset' ] : null ; if ( $ options [ 'seen' ] ) { $ notifications = $ this -> notificationManager -> getNotifications ( $ notifiable , $ order , $ limit , $ offset ) ; } else { $ notifications = $ this -> notificationManager -> getUnseenNotifications ( $ notifiable , $ order , $ limit , $ offset ) ; } // if the template option is set, use custom template $ template = array_key_exists ( 'template' , $ options ) ? $ options [ 'template' ] : '@MgiletNotification/notification_list.html.twig' ; return $ this -> twig -> render ( $ template , array ( 'notificationList' => $ notifications ) ) ; }
Render notifications of the notifiable as a list

@param NotifiableInterface   $notifiable
@param array                 $options

@return string

@throws \RuntimeException
@throws \InvalidArgumentException
Render notifications of the notifiable as a list