getRealConfig() public method

When no configurations are found, it returns a completely new Jarves\Configuration\Bundle object.
public getRealConfig ( string $bundleName ) : Bundle
$bundleName string
return Jarves\Configuration\Bundle
Ejemplo n.º 1
0
 /**
  * @ApiDoc(
  *  section="Bundle Editor",
  *  description="Saves entryPoints. Usually in Resources/config/jarves.entryPoints.xml"
  * )
  *
  * @Rest\QueryParam(name="bundle", requirements=".*", strict=true, description="The bundle name")
  * @Rest\RequestParam(name="entryPoints", strict=false, description="The `objects` value array")
  *
  * @Rest\Post("/admin/system/bundle/editor/entry-points")
  *
  * @param ParamFetcher $paramFetcher
  * @return bool
  */
 public function setEntryPointsAction(ParamFetcher $paramFetcher)
 {
     $bundle = $paramFetcher->get('bundle');
     $entryPoints = $paramFetcher->get('entryPoints') ?: null;
     $config = $this->jarves->getRealConfig($bundle);
     if (!$config) {
         return null;
     }
     $config->propertyFromArray('entryPoints', $entryPoints);
     $result = $this->configurationOperator->saveFileBased($config, 'entryPoints');
     $this->reconfigureJarves();
     return $result;
 }