Provides functions for getting information about subsites
This is the code documentation for the SproutCMS project
Search documentation |
class SubsitesProvides functions for getting information about subsites
Variables
Functions
private determineBestDomainunknown Subsites::determineBestDomain ( mixed $domains ); For a given list of domains, determine the best match based on the current HTTP_HOST If there is an exact match, it is used If there is an ends-with match, it is used Failing all that, the first domain in the list is used public getAbsRootstring Subsites::getAbsRoot ( int $id [, string $protocol ] ); Returns the abs root (including protocol and server name) of the specified subsite Falls back to the current root if no abs root can be found in the database public getAbsRootAdminunknown Subsites::getAbsRootAdmin ( ); Returns the abs root (including protocol and server name) of the current admin subsite public getCodeunknown Subsites::getCode ( mixed $id ); Returns the name of the specified subsite public getCodesarray Subsites::getCodes ( ); Gets the list of subsite codes which are available, by reading the appropriate directory public getConfigmixed Subsites::getConfig ( string $key , int $subsite_id ); Get a config value for a given subsite Use this instead of Kohana::config, if you need to target a specific subsite. It always looks in the "sprout" config file, doesn't support other files. public getConfigAdminunknown Subsites::getConfigAdmin ( mixed $key ); Admin version of the getConfig function, uses the currently active subsite public getFirstAccessableunknown Subsites::getFirstAccessable ( ); Returns the id of the first subsite in the list (alphabetical) that the user is able to access. Returns null if there are no subsites the user can access. public getNameunknown Subsites::getName ( mixed $id ); Returns the name of the specified subsite public hasMultiplebool Subsites::hasMultiple ( ); Determines if multiple subsites can be accessed by the currently logged in administrator public listSelectorvoid Subsites::listSelector ( [ int $selected_id ] ); Outputs a select UL for choosing a subsite from within the admin area public loadConfigunknown Subsites::loadConfig ( string $subsite_code ); Load the configuration for a subsite code. It will only be loaded once per request - it gets cached in a static var private loadSubsitesvoid Subsites::loadSubsites ( ); Loads all the subsites into memory, ready for further processing |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |