/** * {@inheritdoc} */ public function load($resource, $type = 'page') { $data = parent::load($resource, $type); $data = $this->normalizeStructureData($data); $structure = new StructureMetadata(); $structure->name = $data['key']; $structure->cacheLifetime = $data['cacheLifetime']; $structure->controller = $data['controller']; $structure->internal = $data['internal'] === 'true'; $structure->view = $data['view']; $structure->tags = $data['tags']; $structure->parameters = $data['params']; $structure->resource = $resource; $this->mapMeta($structure, $data['meta']); foreach ($data['properties'] as $propertyName => $dataProperty) { $structure->children[$propertyName] = $this->createProperty($propertyName, $dataProperty); } $structure->burnProperties(); return $structure; }
private function loadFixture($name) { $xmlLegacyLoader = new XmlLegacyLoader(); $result = $xmlLegacyLoader->load(__DIR__ . '/../../../../../Resources/DataFixtures/Page/' . $name); return $result; }