Jarves\Controller\Admin\BundleManager\EditorController::setBasicAction PHP Method

setBasicAction() public method

public setBasicAction ( FOS\RestBundle\Request\ParamFetcher $paramFetcher ) : boolean
$paramFetcher FOS\RestBundle\Request\ParamFetcher
return boolean
    public function setBasicAction(ParamFetcher $paramFetcher)
    {
        $bundle = $paramFetcher->get('bundle');
        $events = $paramFetcher->get('events') ?: null;
        $listeners = $paramFetcher->get('listeners') ?: null;
        $adminAssets = $paramFetcher->get('adminAssets') ?: null;
        //        $falDriver = $paramFetcher->get('falDriver') ?: null;
        $config = $this->jarves->getRealConfig($bundle);
        if (!$config) {
            return null;
        }
        $config->propertyFromArray('events', $events);
        $config->propertyFromArray('listeners', $listeners);
        if ($adminAssets) {
            $items = [];
            foreach ($adminAssets as $item) {
                if ('asset' === strtolower($item['type'])) {
                    $items[] = new Asset($item);
                } else {
                    $items[] = new Assets($item);
                }
            }
            $config->setAdminAssets($items);
        }
        $result = $this->configurationOperator->saveFileBased($config, 'events') && $this->configurationOperator->saveFileBased($config, 'listeners') && $this->configurationOperator->saveFileBased($config, 'adminAssets');
        $this->reconfigureJarves();
        return $result;
    }