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;
  }