application/Espo/Core/Utils/AdminNotificationManager.php
public function createNotification($message, $userId = '1')
    {
        $notification = $this->getEntityManager()->getEntity('Notification');
        $notification->set(array(
            'type' => 'message',
            'data' => array(
                'userId' => $userId,
            ),
            'userId' => $userId,
            'message' => $message
        ));
        $this->getEntityManager()->saveEntity($notification);
    }
public function createNotification($message, $userId = '1')
    {
        $notification = $this->getEntityManager()->getEntity('Notification');
        $notification->set(array(
            'type' => 'message',
            'data' => array(
                'userId' => $userId,
            ),
            'userId' => $userId,
            'message' => $message
        ));
        $this->getEntityManager()->saveEntity($notification);
    }
public function createNotification ( $ message , $ userId = '1' ) { $ notification = $ this -> getEntityManager ( ) -> getEntity ( 'Notification' ) ; $ notification -> set ( array ( 'type' => 'message' , 'data' => array ( 'userId' => $ userId , ) , 'userId' => $ userId , 'message' => $ message ) ) ; $ this -> getEntityManager ( ) -> saveEntity ( $ notification ) ; }
Create EspoCRM notification for a user

@param  string $message
@param  string $userId

@return void
Create EspoCRM notification for a user