src/Controller.php
final private function __setDatafromModuleAcf()
    {
        // If $this->acf is not set then return
        if (!$this->acf) {
            return;
        }

        // Set the fields data passed in from Controller
        $this->classAcf->setData($this->acf);

        // Get the options page is $this->acf is set to true on App
        if ($this->template === 'app' && is_bool($this->acf)) {
            $this->classAcf->setDataOptionsPage();
        }

        // Deterime if acf/array filter is enabled and return correct format
        $this->classAcf->setDataReturnFormat();

        // If there is no data return
        if (!$this->classAcf->getData()) {
            return;
        }

        // Merge the data from Acf module
        $this->data = array_merge($this->data, $this->classAcf->getData());
    }
final private function __setDatafromModuleAcf()
    {
        // If $this->acf is not set then return
        if (!$this->acf) {
            return;
        }

        // Set the fields data passed in from Controller
        $this->classAcf->setData($this->acf);

        // Get the options page is $this->acf is set to true on App
        if ($this->template === 'app' && is_bool($this->acf)) {
            $this->classAcf->setDataOptionsPage();
        }

        // Deterime if acf/array filter is enabled and return correct format
        $this->classAcf->setDataReturnFormat();

        // If there is no data return
        if (!$this->classAcf->getData()) {
            return;
        }

        // Merge the data from Acf module
        $this->data = array_merge($this->data, $this->classAcf->getData());
    }
final private function __setDatafromModuleAcf ( ) { // If $this->acf is not set then return if ( ! $ this -> acf ) { return ; } // Set the fields data passed in from Controller $ this -> classAcf -> setData ( $ this -> acf ) ; // Get the options page is $this->acf is set to true on App if ( $ this -> template === 'app' && is_bool ( $ this -> acf ) ) { $ this -> classAcf -> setDataOptionsPage ( ) ; } // Deterime if acf/array filter is enabled and return correct format $ this -> classAcf -> setDataReturnFormat ( ) ; // If there is no data return if ( ! $ this -> classAcf -> getData ( ) ) { return ; } // Merge the data from Acf module $ this -> data = array_merge ( $ this -> data , $ this -> classAcf -> getData ( ) ) ; }
Set Data From Module Acf

Set the Advanced Custom Fields data automatically
Set Data From Module Acf