Show configuration form for given area.

@param UserConfigurationListener $listener
@param AreaContract $area
@return type
12191
public function configure(UserConfigurationListener $listener, AreaContract $area)
    {
        $provider   = $this->twoFactorProvidersService->getEnabledInArea($area);
        $userConfig = $this->userConfigService->saveConfig($provider);


        $form = $this->presenter->configure($userConfig, $area, $provider);

        $this->dispatcher->fire('antares.form: two_factor_auth', [$provider, $form]);

        return $listener->showConfiguration($provider, $form);
    }
1246209
public function createForm(PropertyAccess $conf = null)
    {
        $form = $this->factory->create(new MainConfigurationFormType($this->translator, $this->languages));
        $currentConf = $conf ? ($conf->get('registry') ?: []) : [];
        $data = array_replace_recursive($this->getDefaultData($currentConf), $currentConf);
        $form->setData($data);

        return $form;
    }
516246
public function getConfiguration($form, $model, $context)
    {
        $fields = null;
        foreach ($this->adjusterRegistry->getFormViewProviders() as $provider) {
            if ($provider->supports($form, $model, $context)) {
                $fields = $provider->getFields($model, $context);
                break;
            }
        }
        if ($fields === null) {
            $fields = $this->getFields($model, $form);
        }
        $fields = $this->normalizeFields($fields);
        return $this->getFieldsConfiguration($model, $fields);
    }
494693
public function getEnabledInArea(AreaContract $area)
    {
        $providers = $this->providers->filterByArea($area->getId());

        foreach ($providers as $provider) {
            if ($provider->isEnabled()) {
                return $provider;
            }
        }

        return null;
    }
966047
@Override
    public void areaSelected(Area area)
    {
        //show the separator list
        if (area instanceof AreaImpl)
        {
            SeparatorSet sset = Config.createSeparators((AreaImpl) area);
            DefaultListModel<Separator> ml = new DefaultListModel<Separator>();
            for (Separator sep : sset.getHorizontal())
                ml.addElement(sep);
            for (Separator sep : sset.getVertical())
                ml.addElement(sep);
            for (Separator sep : sset.getBoxsep())
                ml.addElement(sep);
            sepList.setModel(ml);
        }
        else
        {
            //not a grouping area -- no separators
            sepList.setModel(new DefaultListModel<Separator>());
        }
    }
369871
function GrantAddContentToLayoutArea(Area $area)
    {
        $result = $this->Grant(BackendAction::Create(), $area);
        if (!$result->ToBool())
        {
            return $result;
        }
        return $this->GrantAddContentToLayout($area->GetLayout());
    }
390113
public static <PS, SEG, S> Consumer<List<PlainTextChange>> applyMultiPlainTextChange(
            GenericStyledArea<PS, SEG, S> area) {
        return changeList -> {
            MultiChangeBuilder<PS, SEG, S> builder = area.createMultiChange(changeList.size());
            for (PlainTextChange c : changeList) {
                builder.replaceTextAbsolutely(c.getPosition(), c.getRemovalEnd(), c.getInserted());
            }
            builder.commit();
        };
    }
639080
public function createAdminConfiguration(
        string $adminName,
        array $configuration,
        ApplicationConfiguration $applicationConfiguration
    ): AdminConfiguration {
        $event = new ConfigurationEvent($adminName, $configuration, $adminName, $configuration['entity']);
        $this->eventDispatcher->dispatch(Events::CONFIGURATION_ADMIN, $event);

        $resolver = new OptionsResolver();
        $adminConfiguration = new AdminConfiguration($applicationConfiguration);
        $adminConfiguration->configureOptions($resolver);
        $adminConfiguration->setParameters($resolver->resolve($event->getConfiguration()));

        return $adminConfiguration;
    }
790381
public function setArea($area)
    {
        $context = $this->_context;

        $context->area = Text::camelize($area);

        return $this;
    }
83891
protected function CanEdit(Area $area)
    {
        return self::Guard()->Allow(BackendAction::Edit(), $area) &&
                self::Guard()->Allow(BackendAction::UseIt(), new AreaForm());
    }
1229759
public function index(SyncListener $listener, $area, $locale = null)
    {
        $lang = is_null($locale) ? app()->getLocale() : $locale;
        try {
            if (Translation::where('area', $area)->where('locale', $locale)->count()) {
                return redirect(handles('antares::translations/index/' . $area . '/' . $lang));
            }
            if (!is_null($locale)) {
                $this->synchronizer->synchronize(lang($locale), $area);
            } else {
                DB::transaction(function() use($area) {
                    $langs = app('languages')->langs();
                    foreach ($langs as $lang) {
                        $this->synchronizer->synchronize($lang, $area);
                    }
                });
            }
            return $listener->syncSuccess($area, $lang);
        } catch (Exception $e) {
            Log::warning($e);
            return $listener->syncFailed($area, $lang);
        }
    }
1174929
protected function upAreasNode(Database $db, array $templateSetConfig)
    {
        return $db->execute(
            $this->getFindAreaFunction().'

            '.$this->getBlockRefIdFunction().'

            '.$this->getBlockRefFunction().'

            '.$this->getNewAreaStorageFunction().'

            var templateSetConfig = '.json_encode($templateSetConfig).';
            var sharedBlocks = {};

            db.node.find({"nodeType": { $ne: "general"} }).snapshot().forEach(function(item) {
                var site = db.site.findOne({"siteId": item.siteId});
                var templateSet = site.templateSet;

                // get editable areas defined in template set
                if (typeof templateSetConfig[templateSet] !== "undefined" &&
                    typeof templateSetConfig[templateSet]["templates"][item.template] !== "undefined"
                ) {
                    var areas = {};
                    var editableAreas = templateSetConfig[templateSet]["templates"][item.template]["areas"];
                    for(i in editableAreas) {
                        var areaId = editableAreas[i];
                        var area = getNewAreaStorage(areaId, item);
                        areas[areaId] = area;
                    }
                    item.areas = areas;
                    db.node.update({ _id: item._id }, item);
                }
            });
        ');
    }
387512
public function edit(SettingUpdateListener $listener)
    {
        $memory = $this->memory;

        $eloquent = new Fluent([
            'mode' => $memory->get('site.mode', 'development')
        ]);

        $form = $this->presenter->form($eloquent);
        return $listener->showSettingChanger(compact('eloquent', 'form'));
    }
754094
public function view(UserViewerListener $listener, array $input = [])
    {
        $search = [
            'keyword' => $input['q'] ?? '',
            'roles' => $input['roles'] ?? [],
        ];

        // Get Users (with roles) and limit it to only 30 results for
        // pagination. Don't you just love it when pagination simply works.
        $eloquent = Foundation::make('orchestra.user')->search($search['keyword'])->hasRolesId($search['roles']);
        $roles = Foundation::make('orchestra.role')->pluck('name', 'id');

        // Build users table HTML using a schema liked code structure.
        $table = $this->presenter->table($eloquent);

        Event::dispatch('orchestra.list: users', [$eloquent, $table]);

        // Once all event listening to `orchestra.list: users` is executed,
        // we can add we can now add the final column, edit and delete
        // action for users.
        $this->presenter->actions($table);

        $data = [
            'eloquent' => $eloquent,
            'roles' => $roles,
            'table' => $table,
            'search' => $search,
        ];

        return $listener->showUsers($data);
    }
848117
public function edit(ConfigurationListener $listener, AreaContract $area, Provider $provider)
    {
        $provider->area    = $area->getId();
        $provider->enabled = true;

        $provider->setProviderGateway($this->twoFactorProvidersService->getProviderGatewayByName($provider->name));

        $form = $this->presenter->form($provider);

        Event::fire("antares.form: two_factor_auth", [$provider, $form]);
        Event::fire("antares.form: foundation.two_factor_auth", [$provider, $form, "foundation.two_factor_auth"]);

        return $listener->showProviderConfiguration($form);
    }
1023007
@RequestMapping(value = "configurations/create", method = RequestMethod.GET)
    public Form getConfigurationForm() {
        return SVNConfiguration.Companion.form(issueServiceRegistry.getAvailableIssueServiceConfigurations());
    }
916866
private function fillArea(Area $area, $path)
    {
        $finder = new Finder($path);

        foreach (SortorderParser::parse($finder) as $subPath)
        {
            $contentFullPath = $path . DIRECTORY_SEPARATOR . $subPath;
            if(file_exists($contentFullPath))
            {
                //Detect file extension
                $type = substr($subPath, strrpos($subPath, '.') + 1);

                $area->addContentAsLast(
                    new Content(
                        $type,
                        substr($contentFullPath, strlen($this->contentPath))
                    )
                );
            }
            else
            {
                throw new  PageException("Unable to find content at [$contentFullPath]");
            }
        }
    }