public function getFullExperimentsAction()
    {
        $experimentsArray = [];
        /** @var SettingsManager $manager */
        $manager = $this->get('ongr_settings.settings_manager');
        $experiments = $manager->getAllExperiments();
        $activeExperiments = $manager->getActiveExperiments();

        /** @var Setting $experiment */
        foreach ($experiments as $experiment) {
            $experiment = $experiment->getSerializableData();
            $experiment['active'] = in_array($experiment['name'], $activeExperiments);
            $experimentsArray[] = $experiment;
        }

        return new JsonResponse(
            ['count' => count($experiments), 'documents' => $experimentsArray]
        );
    }
public function getFullExperimentsAction()
    {
        $experimentsArray = [];
        /** @var SettingsManager $manager */
        $manager = $this->get('ongr_settings.settings_manager');
        $experiments = $manager->getAllExperiments();
        $activeExperiments = $manager->getActiveExperiments();

        /** @var Setting $experiment */
        foreach ($experiments as $experiment) {
            $experiment = $experiment->getSerializableData();
            $experiment['active'] = in_array($experiment['name'], $activeExperiments);
            $experimentsArray[] = $experiment;
        }

        return new JsonResponse(
            ['count' => count($experiments), 'documents' => $experimentsArray]
        );
    }
public function getFullExperimentsAction ( ) { $ experimentsArray = [ ] ; /** @var SettingsManager $manager */ $ manager = $ this -> get ( 'ongr_settings.settings_manager' ) ; $ experiments = $ manager -> getAllExperiments ( ) ; $ activeExperiments = $ manager -> getActiveExperiments ( ) ; /** @var Setting $experiment */ foreach ( $ experiments as $ experiment ) { $ experiment = $ experiment -> getSerializableData ( ) ; $ experiment [ 'active' ] = in_array ( $ experiment [ 'name' ] , $ activeExperiments ) ; $ experimentsArray [ ] = $ experiment ; } return new JsonResponse ( [ 'count' => count ( $ experiments ) , 'documents' => $ experimentsArray ] ) ; }
Returns a json list of experiments

@return JsonResponse
Returns a json list of experiments