Sulu\Component\Content\Metadata\Factory\StructureMetadataFactory::getStructures PHP Method

getStructures() public method

public getStructures ( $type )
    public function getStructures($type)
    {
        $structureNames = $this->getStructureNames($type);
        $structures = [];
        foreach ($structureNames as $structureName) {
            $structures[] = $this->getStructureMetadata($type, $structureName);
        }
        return $structures;
    }

Usage Example

 /**
  * It returns all structures that are available.
  */
 public function testGetStructures()
 {
     $this->loader->load($this->mappingFile, 'page')->willReturn($this->structure->reveal());
     $this->loader->load($this->mappingFile, 'page')->shouldBeCalledTimes(1);
     $structures = $this->factory->getStructures('page');
     $this->assertEquals($this->structure->reveal(), $structures[0]);
 }
All Usage Examples Of Sulu\Component\Content\Metadata\Factory\StructureMetadataFactory::getStructures