johnhamelink
8/20/2012 - 3:52 PM

change_staff.php

                $interaction = \Entity\Interaction::findOneBy([ 'type' => 'Create Research' ]);

                $event = \Entity\Events::createFromArray([
                    'dateFrom' =>  time(),
                    'feedback' =>  '',
                    'email'    =>  '',
                    'research' =>  $create_result->get_id(),
                    'idStaff'  =>  $create_result->getIdStaff(),
                    'interaction' => $interaction->get_id()
                ]);

                if (!$event->save()) {
                    var_dump($event->getErrors());
                    die();
                }