Example #1
0
 /**
  * Creates a new Event
  *
  * This action requires authentication and outputs the json with the new event or with an array of errors.
  *
  * <code>
  * // creates the url to this action
  * $url = $app->createUrl('agent');
  * </code>
  */
 function POST_index()
 {
     $app = App::i();
     $app->hook('entity(event).insert:before', function () use($app) {
         $this->owner = $app->user->profile;
     });
     parent::POST_index();
 }