Skip to content
Snippets Groups Projects
Commit e1962ff4 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #13296 update getAvailableSessions to findAllBy(select)

parent 4a970698
4 merge requests!258Dev/13872 Orphee Allow Hold Available Items,!180Master,!104Sprint3 Dev #13296 Formation Widget,!98Sprint3 Dev #13296 Formation Widget
......@@ -82,12 +82,8 @@ class Class_Formation extends Storm_Model_Abstract {
public function getAvailableSessions() {
$available_sessions = Class_SessionFormation::findAllBy(['id_formation' => $this->getId()]);
return array_filter(array_map(
function($session) {
return $session->isAvailable() ? $session : '';
},
$available_sessions));
return Class_SessionFormation::findAllBy(['id_formation' => $this->getId(),
'select' => 'isAvailable']);
}
}
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment