public function addEvent(
        ContactSource $contactSource = null,
        $type = null,
        $contact = null,
        $logs = null,
        $message = null
    ) {
        $event = new EventEntity();
        $event->setContactSource($contactSource)
            ->setDateAdded(new \DateTime())
            ->setType($type);
        if ($contact) {
            $event->setContact($contact);
        }
        if (!$logs) {
            // [ENG-418] Exception report - logs can not be null.
            $logs = '';
        }
        $event->setLogs($logs);

        if ($message) {
            $event->setMessage($message);
        }

        $this->getEventRepository()->saveEntity($event);
    }
public function addEvent(
        ContactSource $contactSource = null,
        $type = null,
        $contact = null,
        $logs = null,
        $message = null
    ) {
        $event = new EventEntity();
        $event->setContactSource($contactSource)
            ->setDateAdded(new \DateTime())
            ->setType($type);
        if ($contact) {
            $event->setContact($contact);
        }
        if (!$logs) {
            // [ENG-418] Exception report - logs can not be null.
            $logs = '';
        }
        $event->setLogs($logs);

        if ($message) {
            $event->setMessage($message);
        }

        $this->getEventRepository()->saveEntity($event);
    }
public function addEvent ( ContactSource $ contactSource = null , $ type = null , $ contact = null , $ logs = null , $ message = null ) { $ event = new EventEntity ( ) ; $ event -> setContactSource ( $ contactSource ) -> setDateAdded ( new \ DateTime ( ) ) -> setType ( $ type ) ; if ( $ contact ) { $ event -> setContact ( $ contact ) ; } if ( ! $ logs ) { // [ENG-418] Exception report - logs can not be null. $ logs = '' ; } $ event -> setLogs ( $ logs ) ; if ( $ message ) { $ event -> setMessage ( $ message ) ; } $ this -> getEventRepository ( ) -> saveEntity ( $ event ) ; }
Add transactional log in contactsource_events.

@param ContactSource $contactSource
@param               $type
@param null          $contact
@param null          $logs
@param null          $message
Add transactional log in contactsource_events .