dispatch(new GetAddress($id))) { return null; } return $ad; } ), new \Twig_SimpleFunction( 'getAddressByUser', function ($user_id) { if (!$ad = $this->dispatch(new GetAddressByUser($user_id))) { return null; } return $ad; } ), new \Twig_SimpleFunction( 'getProfileDetail', function ($user_id) { if (!$ad = $this->dispatch(new GetProfileDetail($user_id))) { return null; } return $ad; } ) ]; } }