src/WordPress/Models/FieldGroup.php
function buildConfig(Plugin $plugin)
  {
    if (!empty($this->fields)) {
      $this->config['fields'] = [];
      foreach($this->fields as $field) {
        $this->config['fields'][] = $field->buildConfig($plugin);
      }
    }

    if (!is_null($this->id)) {
      $this->config['id'] = $this->id;
    }

    return $this->config;
  }
function buildConfig(Plugin $plugin)
  {
    if (!empty($this->fields)) {
      $this->config['fields'] = [];
      foreach($this->fields as $field) {
        $this->config['fields'][] = $field->buildConfig($plugin);
      }
    }

    if (!is_null($this->id)) {
      $this->config['id'] = $this->id;
    }

    return $this->config;
  }
function buildConfig ( Plugin $ plugin ) { if ( ! empty ( $ this -> fields ) ) { $ this -> config [ 'fields' ] = [ ] ; foreach ( $ this -> fields as $ field ) { $ this -> config [ 'fields' ] [ ] = $ field -> buildConfig ( $ plugin ) ; } } if ( ! is_null ( $ this -> id ) ) { $ this -> config [ 'id' ] = $ this -> id ; } return $ this -> config ; }
Build field group config
@return array
Build field group config