UniversityFormService.php 1.18 KB
Newer Older
Aspasia Katsi's avatar
Aspasia Katsi committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<?php
/**
 * gredu_labs.
 *
 * @link https://github.com/eellak/gredu_labs for the canonical source repository
 *
 * @copyright Copyright (c) 2008-2015 Greek Free/Open Source Software Society (https://gfoss.ellak.gr/)
 * @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html
 */

namespace GrEduLabs\UniversityForm\Service;

use RedBeanPHP\OODBBean;
use RedBeanPHP\R;

class UniversityFormService implements UniversityFormServiceInterface
{
    public function submit(array $data)
    {

      	$appForm                      = R::dispense('univ');
22
//        $appForm->id                  = $data['id'];
Aspasia Katsi's avatar
Aspasia Katsi committed
23 24 25 26 27 28 29 30 31
        $appForm->idrima              = $data['idrima'];
        $appForm->sxolh               = $data['sxolh'];
        $appForm->tmhma               = $data['tmhma'];
        $appForm->erga                = $data['erga'];
        $appForm->person              = $data['person'];
        $appForm->telef               = trim($data['telef']);
        $appForm->email               = $data['email'];
        $appForm->projectdescription   = $data['projectdescription'];
        $appForm->comments            = $data['comments'];
32 33 34


        R::store($appForm);
Aspasia Katsi's avatar
Aspasia Katsi committed
35 36 37 38 39
        return $appForm;

    }

}