library/Controller/BaseController.php
public function customizerHeader()
    {
        if (get_field('header_layout', 'options') !== 'customizer') {
            return;
        }

        $customizerHeader = new \Municipio\Customizer\Source\CustomizerRepeaterInput('customizer__header_sections', 'options', 'id');
        $this->data['headerLayout']['classes'] = 's-site-header';
        $this->data['headerLayout']['template'] = 'customizer';

        if ($customizerHeader->hasItems) {
            foreach ($customizerHeader->repeater as $headerData) {
                $this->data['headerLayout']['headers'][] = new \Municipio\Customizer\Header($headerData);
            }
        }
    }
public function customizerHeader()
    {
        if (get_field('header_layout', 'options') !== 'customizer') {
            return;
        }

        $customizerHeader = new \Municipio\Customizer\Source\CustomizerRepeaterInput('customizer__header_sections', 'options', 'id');
        $this->data['headerLayout']['classes'] = 's-site-header';
        $this->data['headerLayout']['template'] = 'customizer';

        if ($customizerHeader->hasItems) {
            foreach ($customizerHeader->repeater as $headerData) {
                $this->data['headerLayout']['headers'][] = new \Municipio\Customizer\Header($headerData);
            }
        }
    }
public function customizerHeader ( ) { if ( get_field ( 'header_layout' , 'options' ) !== 'customizer' ) { return ; } $ customizerHeader = new \ Municipio \ Customizer \ Source \ CustomizerRepeaterInput ( 'customizer__header_sections' , 'options' , 'id' ) ; $ this -> data [ 'headerLayout' ] [ 'classes' ] = 's-site-header' ; $ this -> data [ 'headerLayout' ] [ 'template' ] = 'customizer' ; if ( $ customizerHeader -> hasItems ) { foreach ( $ customizerHeader -> repeater as $ headerData ) { $ this -> data [ 'headerLayout' ] [ 'headers' ] [ ] = new \ Municipio \ Customizer \ Header ( $ headerData ) ; } } }
Sends necessary data to the view for customizer header
@return void
Sends necessary data to the view for customizer header