protected function buildTopMatter()
    {
        $topMatterBuilder = SectionBuilder::begin()
            ->setType(SectionBuilder::TYPE_SPAN);

        if ($this->breadCrumbTitles !== []) {
            $breadCrumbsBuilder = SectionBuilder::begin()
                ->setType(SectionBuilder::TYPE_BREADCRUMBS);

            foreach ($this->breadCrumbTitles as $index => $breadCrumbTitle) {
                $breadCrumbLink = $this->breadCrumbLinks[$index];

                if ($breadCrumbLink !== '') {
                    $breadCrumbsBuilder->addWritable(
                        LinkBuilder::begin()->setText($breadCrumbTitle)->setURI($breadCrumbLink)->build()
                    );
                } else {
                    $breadCrumbsBuilder->addContent(
                        $breadCrumbTitle
                    );
                }
            }

            $topMatterBuilder->addWritable($breadCrumbsBuilder->build());
        }

        if ($this->header !== null) {
            $topMatterBuilder->addWritable(
                SectionBuilder::begin()
                    ->setType(SectionBuilder::TYPE_HEADER)
                    ->addLiteralContent($this->header)
                    ->build()
            );
        }

        $topMatterBuilder->addWritable(
            SectionBuilder::begin()
                ->setType(SectionBuilder::TYPE_DIV)
                ->setId('top-filters')
                ->build()
        );

        if ($this->subHeader !== null) {
            $topMatterBuilder->addWritable(
                SectionBuilder::begin()
                    ->setType(SectionBuilder::TYPE_SUBHEADER)
                    ->addLiteralContent($this->subHeader)
                    ->build()
            );
        }

        return $topMatterBuilder->build();
    }
protected function buildTopMatter()
    {
        $topMatterBuilder = SectionBuilder::begin()
            ->setType(SectionBuilder::TYPE_SPAN);

        if ($this->breadCrumbTitles !== []) {
            $breadCrumbsBuilder = SectionBuilder::begin()
                ->setType(SectionBuilder::TYPE_BREADCRUMBS);

            foreach ($this->breadCrumbTitles as $index => $breadCrumbTitle) {
                $breadCrumbLink = $this->breadCrumbLinks[$index];

                if ($breadCrumbLink !== '') {
                    $breadCrumbsBuilder->addWritable(
                        LinkBuilder::begin()->setText($breadCrumbTitle)->setURI($breadCrumbLink)->build()
                    );
                } else {
                    $breadCrumbsBuilder->addContent(
                        $breadCrumbTitle
                    );
                }
            }

            $topMatterBuilder->addWritable($breadCrumbsBuilder->build());
        }

        if ($this->header !== null) {
            $topMatterBuilder->addWritable(
                SectionBuilder::begin()
                    ->setType(SectionBuilder::TYPE_HEADER)
                    ->addLiteralContent($this->header)
                    ->build()
            );
        }

        $topMatterBuilder->addWritable(
            SectionBuilder::begin()
                ->setType(SectionBuilder::TYPE_DIV)
                ->setId('top-filters')
                ->build()
        );

        if ($this->subHeader !== null) {
            $topMatterBuilder->addWritable(
                SectionBuilder::begin()
                    ->setType(SectionBuilder::TYPE_SUBHEADER)
                    ->addLiteralContent($this->subHeader)
                    ->build()
            );
        }

        return $topMatterBuilder->build();
    }
protected function buildTopMatter ( ) { $ topMatterBuilder = SectionBuilder :: begin ( ) -> setType ( SectionBuilder :: TYPE_SPAN ) ; if ( $ this -> breadCrumbTitles !== [ ] ) { $ breadCrumbsBuilder = SectionBuilder :: begin ( ) -> setType ( SectionBuilder :: TYPE_BREADCRUMBS ) ; foreach ( $ this -> breadCrumbTitles as $ index => $ breadCrumbTitle ) { $ breadCrumbLink = $ this -> breadCrumbLinks [ $ index ] ; if ( $ breadCrumbLink !== '' ) { $ breadCrumbsBuilder -> addWritable ( LinkBuilder :: begin ( ) -> setText ( $ breadCrumbTitle ) -> setURI ( $ breadCrumbLink ) -> build ( ) ) ; } else { $ breadCrumbsBuilder -> addContent ( $ breadCrumbTitle ) ; } } $ topMatterBuilder -> addWritable ( $ breadCrumbsBuilder -> build ( ) ) ; } if ( $ this -> header !== null ) { $ topMatterBuilder -> addWritable ( SectionBuilder :: begin ( ) -> setType ( SectionBuilder :: TYPE_HEADER ) -> addLiteralContent ( $ this -> header ) -> build ( ) ) ; } $ topMatterBuilder -> addWritable ( SectionBuilder :: begin ( ) -> setType ( SectionBuilder :: TYPE_DIV ) -> setId ( 'top-filters' ) -> build ( ) ) ; if ( $ this -> subHeader !== null ) { $ topMatterBuilder -> addWritable ( SectionBuilder :: begin ( ) -> setType ( SectionBuilder :: TYPE_SUBHEADER ) -> addLiteralContent ( $ this -> subHeader ) -> build ( ) ) ; } return $ topMatterBuilder -> build ( ) ; }
Build the bread crumbs, header, sub header, etc., of the page.

@return SectionInterface
Build the bread crumbs header sub header etc . of the page .