MenuGenerator.php
protected function setMenu(SourceSet $sourceSet)
    {
        // Second loop to set the menu which was initialized during the first loop
        foreach ($sourceSet->updatedSources() as $source) {
            /** @var \Sculpin\Core\Source\FileSource $source */

            if ($source->isGenerated() || !$source->canBeFormatted()) {
                // Skip generated sources.
                // Only takes pages that can be formatted (AKA *.md)
                continue;
            }

            $source->data()->set('menu', $this->menu);
        }
    }
protected function setMenu(SourceSet $sourceSet)
    {
        // Second loop to set the menu which was initialized during the first loop
        foreach ($sourceSet->updatedSources() as $source) {
            /** @var \Sculpin\Core\Source\FileSource $source */

            if ($source->isGenerated() || !$source->canBeFormatted()) {
                // Skip generated sources.
                // Only takes pages that can be formatted (AKA *.md)
                continue;
            }

            $source->data()->set('menu', $this->menu);
        }
    }
protected function setMenu ( SourceSet $ sourceSet ) { // Second loop to set the menu which was initialized during the first loop foreach ( $ sourceSet -> updatedSources ( ) as $ source ) { /** @var \Sculpin\Core\Source\FileSource $source */ if ( $ source -> isGenerated ( ) || ! $ source -> canBeFormatted ( ) ) { // Skip generated sources. // Only takes pages that can be formatted (AKA *.md) continue ; } $ source -> data ( ) -> set ( 'menu' , $ this -> menu ) ; } }
Now that the menu structure has been created, inject it back to the page.

@param SourceSet $sourceSet
@return void
Now that the menu structure has been created inject it back to the page .