public function index() { /** @var UniformResourceLocator $locator */ $locator = $this->container['locator']; $finder = new \Gantry\Component\Config\ConfigFileFinder(); $files = $finder->getFiles($locator->findResources('gantry-config://positions')); $positions = array_keys($files); sort($positions); $this->params['positions'] = $positions; return $this->container['admin.theme']->render('@gantry-admin/pages/positions/positions.html.twig', $this->params); }
public function index() { /** @var UniformResourceLocator $locator */ $locator = $this->container['locator']; $finder = new \Gantry\Component\Config\ConfigFileFinder(); $files = $finder->getFiles($locator->findResources('gantry-layouts://')); $layouts = array_keys($files); sort($layouts); $layouts_user = array_filter($layouts, function ($val) { return strpos($val, 'presets/') !== 0 && substr($val, 0, 1) !== '_'; }); $layouts_core = array_filter($layouts, function ($val) { return strpos($val, 'presets/') !== 0 && substr($val, 0, 1) === '_'; }); $this->params['layouts'] = ['user' => $layouts_user, 'core' => $layouts_core]; return $this->container['admin.theme']->render('@gantry-admin/pages/configurations/configurations.html.twig', $this->params); }