getData() public méthode

Get the data to be stored in the notification.
public getData ( ) : array | null
Résultat array | null
Exemple #1
0
 /**
  * Construct an array of attributes to be stored in a notification record in
  * the database, given a notification blueprint.
  *
  * @param BlueprintInterface $blueprint
  * @return array
  */
 protected function getAttributes(BlueprintInterface $blueprint)
 {
     return ['type' => $blueprint::getType(), 'sender_id' => ($sender = $blueprint->getSender()) ? $sender->id : null, 'subject_id' => ($subject = $blueprint->getSubject()) ? $subject->id : null, 'data' => ($data = $blueprint->getData()) ? json_encode($data) : null];
 }