Provides static methods to work with yours contexts, sites and languages.
See also
Returns: | An array of all your valid contexts. |
---|
<?php
$contexts = \Nos\Tools_Context::contexts();
foreach ($contexts as $context_code => $context_urls) {
// ....
}
Returns: | An array of all your valid sites. Each site has a title and an alias. |
---|
<?php
$sites = \Nos\Tools_Context::sites();
foreach ($sites as $site_key => $site_params) {
$title = $site_params['title'];
$alias = $site_params['alias'];
}
Returns: | An array of all your valid locales. Each locale has a title and a flag’s code flag. |
---|
<?php
$locales = \Nos\Tools_Context::locales();
foreach ($locales as $locale_key => $locale_params) {
$title = $locale_params['title'];
$flag = $locale_params['flag'];
}
Returns: | The code of default context of your Novius OS instance. |
---|
<?php
$default_context_code = \Nos\Tools_Context::defaultContext();