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
Extending this class<?php
/**
* New class description goes here
*
* @author Your Name, 2025-11-16
**/
class NewClassName extends Subsites {
/**
* Gets the list of subsite codes which are available, by reading the appropriate directory
**/
public function getCodes () {
// Method code goes here
}
/**
* Load the configuration for a subsite code.
* It will only be loaded once per request - it gets cached in a static var
**/
public function loadConfig (string $subsite_code) {
// Method code goes here
}
/**
* Admin version of the getConfig function, uses the currently active subsite
**/
public function getConfigAdmin ($key) {
// Method code goes here
}
/**
* 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 function getConfig (string $key, int $subsite_id) {
// Method code goes here
}
/**
* Returns the abs root (including protocol and server name) of the current admin subsite
**/
public function getAbsRootAdmin () {
// Method code goes here
}
/**
* Returns the name of the specified subsite
**/
public function getName ($id) {
// Method code goes here
}
/**
* 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 function getAbsRoot (int $id, string $protocol) {
// Method code goes here
}
/**
* Outputs a select UL for choosing a subsite from within the admin area
**/
public function listSelector (int $selected_id) {
// Method code goes here
}
/**
* Returns the name of the specified subsite
**/
public function getCode ($id) {
// Method code goes here
}
/**
* 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
**/
private function determineBestDomain ($domains) {
// Method code goes here
}
/**
* 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 function getFirstAccessable () {
// Method code goes here
}
/**
* Loads all the subsites into memory, ready for further processing
**/
private function loadSubsites () {
// Method code goes here
}
/**
* Determines if multiple subsites can be accessed by the currently logged in administrator
**/
public function hasMultiple () {
// Method code goes here
}
}
?>
|
| 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 |
|