lib/private/Activity/Manager.php
/**
	 * Publish an event to the activity consumers
	 *
	 * Make sure to call at least the following methods before sending an Event:
	 *  - setApp()
	 *  - setType()
	 *  - setAffectedUser()
	 *  - setSubject()
	 *
	 * @param IEvent $event
	 * @throws \BadMethodCallException if required values have not been set
	 */
Publish an event to the activity consumers
Make sure to call at least the following methods before sending an Event:
- setApp()
- setType()
- setAffectedUser()
- setSubject()

@param IEvent $event
@throws \BadMethodCallException if required values have not been set
Publish an event to the activity consumers Make sure to call at least the following methods before sending an Event : - setApp () - setType () - setAffectedUser () - setSubject () @param IEvent $event @throws \ BadMethodCallException if required values have not been set
public function publish(IEvent $event) {
		if ($event->getAuthor() === '') {
			if ($this->session->getUser() instanceof IUser) {
				$event->setAuthor($this->session->getUser()->getUID());
			}
		}
		if (!$event->getTimestamp()) {
			$event->setTimestamp(time());
		}
		if (!$event->isValid()) {
			throw new \BadMethodCallException('The given event is invalid');
		}
		foreach ($this->getConsumers() as $c) {
			$c->receive($event);
		}
	}
public function publish ( IEvent $ event ) { if ( $ event -> getAuthor ( ) === '' ) { if ( $ this -> session -> getUser ( ) instanceof IUser ) { $ event -> setAuthor ( $ this -> session -> getUser ( ) -> getUID ( ) ) ; } } if ( ! $ event -> getTimestamp ( ) ) { $ event -> setTimestamp ( time ( ) ) ; } if ( ! $ event -> isValid ( ) ) { throw new \ BadMethodCallException ( 'The given event is invalid' ) ; } foreach ( $ this -> getConsumers ( ) as $ c ) { $ c -> receive ( $ event ) ; } }
Publish an event to the activity consumers
 Make sure to call at least the following methods before sending an Event:
  - setApp()
  - setType()
  - setAffectedUser()
  - setSubject()
Publish an event to the activity consumers Make sure to call at least the following methods before sending an Event : - setApp () - setType () - setAffectedUser () - setSubject ()