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
9a0f84b5
Commit
9a0f84b5
authored
Feb 24, 2016
by
kanellov
Browse files
fix assets lab_id
parent
c71043c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
module/schools/src/InputFilter/SchoolAsset.php
View file @
9a0f84b5
...
...
@@ -49,7 +49,9 @@ class SchoolAsset
$labId
=
new
Input
(
'lab_id'
);
$labId
->
setRequired
(
true
)
->
getValidatorChain
()
->
getFilterChain
()
->
attach
(
new
Filter\ToInt
());
$labId
->
getValidatorChain
()
->
attach
(
new
Validator\NotEmpty
())
->
attach
(
new
Validator\Callback
([
'callback'
=>
function
(
$value
)
use
(
$labService
)
{
...
...
@@ -95,7 +97,7 @@ class SchoolAsset
$this
->
inputFilter
=
new
InputFilter
();
$this
->
inputFilter
->
add
(
$id
)
//
->add($labId)
->
add
(
$labId
)
->
add
(
$itemCategoryId
)
->
add
(
$qty
)
->
add
(
$acquisitionYear
)
...
...
module/schools/src/Service/LabService.php
View file @
9a0f84b5
...
...
@@ -66,7 +66,7 @@ class LabService implements LabServiceInterface
throw
new
InvalidArgumentException
(
'No lab found'
);
}
return
$this
->
export
(
$lab
);
return
$this
->
export
Lab
(
$lab
);
}
public
function
getLabsBySchoolId
(
$id
)
...
...
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