Lists all available configurations.

@Route("/")
@Method("GET|POST")
540998
public function indexAction(Request $request)
    {
        $form = $this->createForm(new ExtendableConfigurationType($this->get('madrak_io_extendable_configuration.extendable_configuration_chain')->getBuiltConfiguration()));
        $form->setData($this->get('madrak_io_extendable_configuration.configuration_service')->getAll());

        $form->handleRequest($request);

        if ($form->isValid() === true) {
            $entityClass = $this->getParameter('madrak_io_extendable_configuration.configuration_class');
            $entityManager = $this->get('doctrine.orm.default_entity_manager');
            $repository = $entityManager->getRepository($entityClass);

            $recursiveIteratorIterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($form->getData()['configuration']));
            foreach ($recursiveIteratorIterator as $configurationValue) {
                $keys = [];
                for ($depth = 0; $depth <= $recursiveIteratorIterator->getDepth(); ++$depth) {
                    $keys[] = $recursiveIteratorIterator->getSubIterator($depth)->key();
                }

                $configurationField = implode('.', $keys);

                $configurationEntity = $repository->findOneBy(['field' => $configurationField]);
                if (($configurationEntity instanceof $entityClass) === false) {
                    $configurationEntity = new $entityClass();
                    $configurationEntity->setField($configurationField);
                }

                $configurationEntity->setValue($configurationValue);

                $entityManager->persist($configurationEntity);
            }

            $entityManager->flush();
        }

        return $this->render('MadrakIOExtendableConfigurationBundle:Configuration:edit.html.twig',
                                [
                                    'parent_template' => $this->getParentTemplate(),
                                    'form' => $form->createView(),
                                ]);
    }
942339
public function listAction(Request $request)
    {
        /** @var ConfiguratorFactory $configuratorFactory */
        $configuratorFactory = $this->getConfiguratorFactory($this->getClassName());
        /** @var CrudConfigurator $crudConfigurator */
        $crudConfigurator = $configuratorFactory->getConfigurator(CrudConfigurator::class);

        $this->isGrantedOr404Error($crudConfigurator, Constants::ACTION_READ);

        /** @var GridConfigurator $gridConfigurator */
        $gridConfigurator = $configuratorFactory->getConfigurator(GridConfigurator::class);
        /* @var PageConfigurator $pageConfigurator */
        $pageConfigurator = $configuratorFactory->getConfigurator(PageConfigurator::class);

        $translator = $this->get('translator');
        $translationDomain = $this->getParameter('symfonyid.admin.translation_domain');

        $template = $crudConfigurator->getTemplate();
        $listTemplate = $request->isXmlHttpRequest() ? $template->getAjaxTemplate() : $template->getList();

        $reflectionModel = new \ReflectionClass($crudConfigurator->getCrud()->getModelClass());
        $filters = $gridConfigurator->getFilters($reflectionModel);

        /** @var View $view */
        $view = $this->get('symfonyid.admin.view.view');
        $view->setParam('page_title', $translator->trans($pageConfigurator->getTitle(), array(), $translationDomain));
        $view->setParam('page_description', $translator->trans($pageConfigurator->getDescription(), array(), $translationDomain));

        /*
         * Translate tentity fields
         */
        $view->setParam('filter_fields', implode(', ', array_map(function ($value) use ($translator, $translationDomain) {
            return $translator->trans(sprintf('entity.fields.%s', $value), array(), $translationDomain);
        }, $filters)));
        $view->setParam('filter_fields_entity', implode(', ', $filters));

        return $this->doList($request, $crudConfigurator, $view, $gridConfigurator->getColumns($reflectionModel), $listTemplate, $gridConfigurator->getGrid()->isFormatNumber());
    }
250396
protected function getOptionalParameters()
    {
        preg_match_all('/\{(\w+?)\?\}/', $this->route->uri(), $matches);

        return isset($matches[1]) ? array_fill_keys($matches[1], null) : [];
    }
618777
public function getOptionRoutes()
    {
        $cached = $this->cacheProvider->fetch('cached_restutils_route_options');
        if ($cached) {
            return $cached;
        }
        $ret = array_filter(
            $this->router->getRouteCollection()->all(),
            function ($route) {
                if (!in_array('OPTIONS', $route->getMethods())) {
                    return false;
                }
                // ignore all schema routes
                if (strpos($route->getPath(), '/schema') === 0) {
                    return false;
                }
                if ($route->getPath() == '/' || $route->getPath() == '/core/version') {
                    return false;
                }

                return is_null($route->getRequirement('id'));
            }
        );
        $this->cacheProvider->save('cached_restutils_route_options', $ret);
        return $ret;
    }
154154
public function index()
    {
        // Look for overriden views
        $this->overrideViews();

        // Get models to show
        $results = $this->makeIndexQuery()->paginate($this->perPage());

        // Render the view using the `listing` builder
        $listing = Listing::createFromController($this, $results);
        if ($this->parent) {
            $listing->parent($this->parent);

            // The layout header may have a many to many autocomplete
            $this->layout->with($this->autocompleteViewVars());
        }

        // Render view
        return $this->populateView($listing);
    }
1256227
def do_list():
    
    dirs =  os.walk(CONFIG_ROOT).next()[1]
    if dirs:
        print "List of available configurations:\n"
        for d in dirs:
            print "  * {}".format(d)
    else:
        print "No configurations available."
418849
public function setupRoutes()
    {
        $routesFile = app_path().'/Http/routes.php';

        $currentRoutes = file_get_contents($routesFile);

        if(strstr($currentRoutes,"ENTRANCE ROUTES") == false){
            $token = '';
            $routes = "\n //ENTRANCE ROUTES \n//Prefix for the paths below.
Route::group(['prefix' => config('entrance.prefix')], function() {

    Route::get('login', ['as' => 'login.index', 'uses' => function () {
        return view('entrance::pages.login');
    }]);

    // POST - Logs user in
    Route::post('login', ['as' => 'postLogin', 'uses' => config('entrance.classes.entrance_controller').'@doLogin']);
    // GET - Logs user out
    Route::get('logout', ['as' => 'logout.index', 'uses' => config('entrance.classes.entrance_controller').'@doLogout']);

    // GET- Show succes page
    Route::get('resetSuccess', ['as' => 'reset.success', 'uses' => config('entrance.classes.entrance_controller').'@showResetSuccess']);
    Route::get('success', ['as' => 'success', 'uses' => function () {
        return view('entrance::pages.success');
    }]);

    // GET - Show the send reset e-mail page/form
    Route::get('reset-password', ['as' => 'reset.password', 'uses' => function () {
        return view('entrance::pages.resetpassword');
    }]);

    // POST - Send reset e-mail
    Route::post('sendReset', ['as' => 'sendReset', 'uses' => config('entrance.classes.entrance_controller').'@sendReset']);

    // GET - Show reset page/form
    Route::get('reset/{token}', ['as' => 'password_reset', 'middleware' => 'checktoken', 'uses' => function (\$token) {
        return view('entrance::pages.reset')->with(['token' => \$token]);
    }]);

    // POST - Reset Password
    Route::post('doReset', ['as' => 'doReset', 'uses' => config('entrance.classes.entrance_controller').'@doReset']);

    // GET - Show register form
    Route::get('register', ['as' => 'register', 'uses' => function() {
        return view('entrance::pages.register');
    }]);

    // POST - Register User
    Route::post('doRegister', ['as' => 'postRegister', 'uses' => config('entrance.classes.entrance_controller').'@doRegister']);

    //Authentication group - Check if user is logged in
    Route::group(['middleware' => 'checklogin'], function() {

    });
});
        \n";


        file_put_contents($routesFile, $routes, FILE_APPEND | LOCK_EX);
        }

    }
1209530
public function list_settings()
    {
        if (!$this->is_loggedin) {
            return false;
        }

        $response = $this->exec_curl('/api/s/' . $this->site . '/get/setting');

        return $this->process_response($response);
    }
915613
protected function getAvailablePlans()
    {
        $config = $this->config();
        if ($config->has('experimental.available_plans')) {
            return $config->get('experimental.available_plans');
        }

        return $config->get('service.available_plans');
    }
345823
def list_build_configurations(page_size=200, page_index=0, sort="", q=""):
    
    data = list_build_configurations_raw(page_size, page_index, sort, q)
    if data:
        return utils.format_json_list(data)
268775
public function getRoutes()
    {
        if ($this->config['app']['debug']) {
            $html = '<pre>';
            $result = array();
            foreach ($this->modules as $module) {
                $list = $module->getControllersUrlRoutes();
                $result = array_merge($list, $result);
            }
            $html .= implode("\n", $result);
            $html .= '</pre>';
            return $html;
        }
        return "";
    }
1018035
protected function _routes() {

        if(!isset($this->config['match'])) {
            return null;
        }
        $match = $this->config['match'];
        if(is_string($match)) {
            return include $match;
        }
        return $match;
    }
436629
public function getList()
    {
        $response = $this->getResponse();
        $configurationHandler = $this->getConfigurationHandler();
        $configuration = $configurationHandler->getConfiguration();
        $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');
        $adapter = new Json();
        $response->setContent($adapter->serialize($configuration));
        return $response;
    }
518517
public function getAllPostGet()
    {
        if (isset($this->request->post, $this->request->get)) {
            return array_merge($this->request->get, $this->request->post);
        }
        return $this->request->post ?? $this->request->get ?? [];
    }
51424
function listConfig(): array
    {
        $config = [
            "instanceIdAttribute" => $this->instanceIdAttribute,
            "multiformAttribute" => $this->multiformAttribute,
            "displayMode" => $this->displayMode,
            "searchable" => $this->searchable,
            "paginated" => $this->paginated,
            "reorderable" => !is_null($this->reorderHandler),
            "defaultSort" => $this->defaultSort,
            "defaultSortDir" => $this->defaultSortDir,
        ];

        $this->appendFiltersToConfig($config);

        $this->appendEntityStateToConfig($config);

        $this->appendCommandsToConfig($config);

        return $config;
    }
458353
public function index()
    {
        $apiRequest = RequestFactory::create();

        $page = $apiRequest->getPage();
        if (!$page->size()) {
            $page->setSize($this->pageSize);
        }

        $fields = $apiRequest->getFields();
        $sorting = $apiRequest->getSort();
        $included = $apiRequest->getIncludedRelationships();
        $filters = $apiRequest->getFilters();

        $resource = new ListResource($this->serializer, $page, $fields, $sorting, $included, $filters);

        $totalAmount = $this->totalAmountResourceCallable();
        $results = $this->listResourceCallable();

        $controllerAction = '\\'.get_called_class().'@index';
        $uri = $this->uriGenerator($controllerAction);

        return $this->addHeaders($resource->get($totalAmount, $results, $uri, get_class($this->getDataModel())));
    }
830923
public function getConfigParams()
    {
        $response = array_merge(Config::$required, Config::$optional);
        $domains = Router::getInstance()->getDomains();
        foreach ($domains as $domain => $routes) {
            $pDomain = str_replace('@', '', $domain);
            $pDomain = str_replace('/', '', $pDomain);
            $response[] = strtolower($pDomain) . '.api.secret';
        }
        return $this->json($response);
    }