src/AcfExportManager.php
public function getFieldgroupParams(int $fieldgroupId, bool $translate = true) : array
    {
        // Get the fieldgroup
        $fieldgroup = acf_get_field_group($fieldgroupId);

        // Bail if fieldgroup is empty
        if (empty($fieldgroup)) {
            trigger_error('The fieldgroup with id "' . $fieldgroupId . '" is empty.', E_USER_WARNING);
            return array();
        }

        // Get the fields in the fieldgroup
        $fieldgroup['fields'] = acf_get_fields($fieldgroup);

        // Translate
        if ($translate) {
            $fieldgroup = $this->translate($fieldgroup);
        }

        // Preapre for export
        return acf_prepare_field_group_for_export($fieldgroup);
    }
public function getFieldgroupParams(int $fieldgroupId, bool $translate = true) : array
    {
        // Get the fieldgroup
        $fieldgroup = acf_get_field_group($fieldgroupId);

        // Bail if fieldgroup is empty
        if (empty($fieldgroup)) {
            trigger_error('The fieldgroup with id "' . $fieldgroupId . '" is empty.', E_USER_WARNING);
            return array();
        }

        // Get the fields in the fieldgroup
        $fieldgroup['fields'] = acf_get_fields($fieldgroup);

        // Translate
        if ($translate) {
            $fieldgroup = $this->translate($fieldgroup);
        }

        // Preapre for export
        return acf_prepare_field_group_for_export($fieldgroup);
    }
public function getFieldgroupParams ( int $ fieldgroupId , bool $ translate = true ) : array { // Get the fieldgroup $ fieldgroup = acf_get_field_group ( $ fieldgroupId ) ; // Bail if fieldgroup is empty if ( empty ( $ fieldgroup ) ) { trigger_error ( 'The fieldgroup with id "' . $ fieldgroupId . '" is empty.' , E_USER_WARNING ) ; return array ( ) ; } // Get the fields in the fieldgroup $ fieldgroup [ 'fields' ] = acf_get_fields ( $ fieldgroup ) ; // Translate if ( $ translate ) { $ fieldgroup = $ this -> translate ( $ fieldgroup ) ; } // Preapre for export return acf_prepare_field_group_for_export ( $ fieldgroup ) ; }
Get exportable fieldgroup params
@param  int    $fieldgroupId
@return array
Get exportable fieldgroup params