Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagephp
titleFetch Client Group Settings with Inheritance
firstline1
linenumberstrue
<?php
public function MyController extends AppController {

	...

	public function index() {
		$this->components(array("SettingsCollection"));
		
		// Fetch all Client Group settings
		$client_group_id = 1;
		$client_group_settings = $this->SettingsCollection->fetchClientGroupSettings($client_group_id);
		
		// Take a look at the client group settings
		foreach ($client_group_settings as $setting)
			echo $setting->key . ": " . $setting->value;
	}
}
?>
Code Block
titleExample Output
autodebit: true
inv_days_before_renewal: 1
autosuspend: true
default_currency: USD