Class cfSiteManager
cfSiteManager Class
Class to provide site management functionality.
Package: clearFusionCMS
Copyright:
Copyright (c) 2012 - 2016 clearFusionCMS. All rights reserved.
Located at system/app/cfSiteManager.php
Methods summary
public
|
#
__construct( flDb $db )
Construct the object.
Parameters
|
public
array
|
#
listSites( null|array $perms = null )
Get an array holding the list of sites.
Get an array holding the list of sites.
Parameters
- $perms
- If given an array of permissions to match against the site edit perms.
Returns
array shortname => displayname
|
public
|
#
initSite( string $shortName )
Initialise the configuration and content tables for a new site.
Initialise the configuration and content tables for a new site.
Parameters
- $shortName
- The name of the new site.
|
public
boolean
|
#
createSite( string $shortName, string $domain, string $displayName, string $clone, string $locale = 'en_US', string $twitterUsername = '', string $editPerm = '', array $aliases = array() )
Create a new site.
Parameters
- $shortName
- The short name of the site.
- $domain
- The domain name.
- $displayName
- The display name for the site.
- $clone
- The site to clone the configuration from.
- $locale
- The locale for the site.
- $twitterUsername
- The twitter username associated with the site.
- $editPerm
- The permission required to edit the site.
- $aliases
- Array of domains that map to the site as well.
Returns
boolean true if the site was created; else false.
|
public
boolean
|
#
deleteSite( string $shortName )
Delete a site.
Parameters
- $shortName
- The name of the site to delete.
Returns
boolean true if the site was deleted; else false.
|
public
boolean
|
#
updateSite( string $shortName, string $domain, string $displayName, array $aliases, string $locale = 'en_US', string $editPerm = '', string $twitterUsername = '' )
Update the information for a site.
Update the information for a site.
Parameters
- $shortName
- The short name of the site.
- $domain
- The new domain name.
- $displayName
- The mew display name for the site.
- $aliases
- Array of domains that map to the site as well.
- $locale
- The locale for the site.
- $editPerm
- The permission required to edit the site.
- $twitterUsername
- Then optional twitter username to attribute the site to.
Returns
boolean true if the site was updated; else false.
|
public
flConfig
|
#
getSiteCfg( string $namespace, string $site )
Get a configuration object for the namespace within the site.
Get a configuration object for the namespace within the site.
Parameters
- $namespace
- Name of the configuration data to load.
- $site
- The name short name of the site.
Returns
|
public
string
|
#
getLocale( string $shortName )
Get the locale of a site.
Get the locale of a site.
Parameters
- $shortName
- The name of the site to get the locale of.
Returns
string The site locale.
|