src/Sulu/Bundle/PageBundle/Resources/phpcr-migrations/Version201511240843.php
private function findDateBlockProperties(BlockMetadata $property, $structureName, array &$properties)
    {
        $result = ['property' => $property, 'components' => []];
        foreach ($property->getComponents() as $component) {
            $componentResult = ['component' => $component, 'children' => []];
            foreach ($component->getChildren() as $childProperty) {
                if ('date' === $childProperty->getType()) {
                    $componentResult['children'][$childProperty->getName()] = $childProperty;
                }
            }

            if (count($componentResult['children']) > 0) {
                $result['components'][$component->getName()] = $componentResult;
            }
        }

        if (count($result['components']) > 0) {
            $properties[$structureName][] = $result;
        }
    }
private function findDateBlockProperties(BlockMetadata $property, $structureName, array &$properties)
    {
        $result = ['property' => $property, 'components' => []];
        foreach ($property->getComponents() as $component) {
            $componentResult = ['component' => $component, 'children' => []];
            foreach ($component->getChildren() as $childProperty) {
                if ('date' === $childProperty->getType()) {
                    $componentResult['children'][$childProperty->getName()] = $childProperty;
                }
            }

            if (count($componentResult['children']) > 0) {
                $result['components'][$component->getName()] = $componentResult;
            }
        }

        if (count($result['components']) > 0) {
            $properties[$structureName][] = $result;
        }
    }
private function findDateBlockProperties ( BlockMetadata $ property , $ structureName , array & $ properties ) { $ result = [ 'property' => $ property , 'components' => [ ] ] ; foreach ( $ property -> getComponents ( ) as $ component ) { $ componentResult = [ 'component' => $ component , 'children' => [ ] ] ; foreach ( $ component -> getChildren ( ) as $ childProperty ) { if ( 'date' === $ childProperty -> getType ( ) ) { $ componentResult [ 'children' ] [ $ childProperty -> getName ( ) ] = $ childProperty ; } } if ( count ( $ componentResult [ 'children' ] ) > 0 ) { $ result [ 'components' ] [ $ component -> getName ( ) ] = $ componentResult ; } } if ( count ( $ result [ 'components' ] ) > 0 ) { $ properties [ $ structureName ] [ ] = $ result ; } }
Adds the block property to the list, if it contains a date field.

@param BlockMetadata $property The block property to check
@param string $structureName The name of the structure the property belongs to
@param array $properties The list of properties, to which the block is added if it is a date field
Adds the block property to the list if it contains a date field .