Commit c34c32c3 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Merge branch 'hotfix_navigation_coencadrant'

parents 8c37cf5d 03a009f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ return [
                    'historique' => [
                        'type'          => Segment::class,
                        'options'       => [
                            'route'    => '/historique/:co-encadrant',
                            'route'    => '/historique[/:co-encadrant]',
                            'defaults' => [
                                'controller'    => CoEncadrantController::class,
                                'action'        => 'historique',
+4 −0
Original line number Diff line number Diff line
@@ -134,6 +134,10 @@ class CoEncadrantController extends AbstractActionController {
    public function historiqueAction()
    {
        $coencadrant = $this->getCoEncadrantService()->getRequestedCoEncadrant($this);
        if ($coencadrant === null) {
            return $this->redirect()->toRoute('co-encadrant', [], [], true);
        }

        $theses = $this->getTheseService()->getRepository()->fetchThesesByCoEncadrant($coencadrant->getIndividu());

        $encours = []; $closes = [];
+2 −2
Original line number Diff line number Diff line
@@ -63,9 +63,9 @@ class CoEncadrantService {
    /**
     * @param AbstractActionController $controller
     * @param string $param
     * @return Acteur
     * @return ?Acteur
     */
    public function getRequestedCoEncadrant(AbstractActionController $controller, string $param = 'co-encadrant')
    public function getRequestedCoEncadrant(AbstractActionController $controller, string $param = 'co-encadrant') : ?Acteur
    {
        $id = $controller->params()->fromRoute($param);
        $result = $this->getCoEncadrant($id);