You are here

public function GTMSettings::save in GoogleTagManager 7.2

Saves settings to database.

Return value

bool Whether the save was successful.

File

includes/entity/settings.inc, line 59

Class

GTMSettings
Defines the module settings entity.

Code

public function save() {

  // On load the properties include ctools items: table, type, export_type.
  $export_type = isset($this->export_type) ? $this->export_type : NULL;
  $data = (array) $this;
  unset($data['table'], $data['type'], $data['export_type']);
  $settings['name'] = 'google_tag.settings';
  $settings['data'] = $data;
  $settings['type'] = 'Normal';
  $settings['export_type'] = $export_type;
  $settings = (object) $settings;
  $result = ctools_export_crud_save('gtag_config', $settings);
  return $result;
}