- ⌂ Folder
- Methods
Folder::get_settings()
Get the folder settings for a given content type.
Prototype
get_settings(ContentType $content_type, ContentType $settings_type): collection
Parameters
- content_type - The Content Type to get settings for.
- settings_type - The type of settings to retrieve. Options include the content types:
- Folder Settings
- Publish Settings
- Rich Text Settings.
Return
A collection of settings of settings_type for the content_type. The collection may be empty if no settings match the content type and settings type.
Example
$repo = \comand::repo();
$template_ct = $repo->get('[:ContentType]Template');
$folder_settings_ct = $repo->get('[:ContentType]FolderSettings');
$folder = $repo->get('/');
$folder_settings = $folder->get_settings($template_ct, $folder_settings_ct);
foreach($folder_settings as $setting) {
echo("$setting\n");
}