Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Σταύρος Παπαδάκης
gredu_labs
Commits
14ddb086
Commit
14ddb086
authored
Feb 12, 2016
by
Georgios Tsakalos
Browse files
correct fields of school entity
parent
16f12163
Changes
1
Hide whitespace changes
Inline
Side-by-side
module/schools/src/Service/SchoolService.php
View file @
14ddb086
...
...
@@ -16,8 +16,8 @@ class SchoolService implements SchoolServiceInterface
public
function
createSchool
(
array
$data
)
{
$school
=
R
::
dispense
(
'school'
);
$required
=
[
'registry_no'
,
'name'
,
'municipality'
,
'schooltype_id'
,
'prefecture_id'
,
'educationlevel_id'
,
'eduadmin_id'
,
'created'
,
'creator'
];
$required
=
[
'registry_no'
,
'name'
,
'municipality'
,
'schooltype_id'
,
'prefecture_id'
,
'educationlevel_id'
,
'eduadmin_id'
,
'created'
,
'creator'
];
$optional
=
[
'street_address'
,
'postal_code'
,
'phone_number'
,
'fax_number'
,
'email'
];
foreach
(
$required
as
$value
)
{
if
(
array_key_exists
(
$value
,
$data
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment