public function getRecipients($context = null)
    {
        $recipients = ArrayList::create();

        // if we have a context, use that for returning the recipients
        if ($context && ($context instanceof NotifiedOn || $context->hasMethod('getRecipients'))) 
        {
            $contextRecipients = $context->getRecipients($this->Identifier);
            if ($contextRecipients) {
                $recipients->merge($contextRecipients);
            }
        }

        if ($context instanceof Member) {
            $recipients->push($context);
        } else {
            if ($context instanceof Group) {
                $recipients = $context->Members();
            }
        }

        // otherwise load with a preconfigured list of recipients
        return $recipients;
    }
public function getRecipients($context = null)
    {
        $recipients = ArrayList::create();

        // if we have a context, use that for returning the recipients
        if ($context && ($context instanceof NotifiedOn || $context->hasMethod('getRecipients'))) 
        {
            $contextRecipients = $context->getRecipients($this->Identifier);
            if ($contextRecipients) {
                $recipients->merge($contextRecipients);
            }
        }

        if ($context instanceof Member) {
            $recipients->push($context);
        } else {
            if ($context instanceof Group) {
                $recipients = $context->Members();
            }
        }

        // otherwise load with a preconfigured list of recipients
        return $recipients;
    }
public function getRecipients ( $ context = null ) { $ recipients = ArrayList :: create ( ) ; // if we have a context, use that for returning the recipients if ( $ context && ( $ context instanceof NotifiedOn || $ context -> hasMethod ( 'getRecipients' ) ) ) { $ contextRecipients = $ context -> getRecipients ( $ this -> Identifier ) ; if ( $ contextRecipients ) { $ recipients -> merge ( $ contextRecipients ) ; } } if ( $ context instanceof Member ) { $ recipients -> push ( $ context ) ; } else { if ( $ context instanceof Group ) { $ recipients = $ context -> Members ( ) ; } } // otherwise load with a preconfigured list of recipients return $ recipients ; }
Get a list of recipients from the notification with the given context
@param  DataObject $context
The context object this notification is attached to.
@return ArrayList
Get a list of recipients from the notification with the given context