\org_openpsa_core_siteconfig

Helper class that serves as a cache for OpenPSA site information

It locates topics for specific components used in OpenPSA and automatically generates a cached version of the site structure in the config snippet

Summary

Methods
Properties
Constants
__construct()
__get()
__isset()
set_active_leaf()
add_stylesheet()
get_workflow()
get_instance()
node_exists()
get_node_full_url()
get_node_relative_url()
get_node_guid()
$_component
$_i18n
$_l10n
$_l10n_midcom
$_config
No constants found
No protected methods found
No protected properties found
N/A
initialize_site_structure()
load_snippet()
get()
$_services
$components
$data
$snippet
$instance
N/A

Properties

$_component

$_component : string

The name of the component, e.g. net.nehmer.static. Should be used whenever the component's name is required instead of hardcoding it.

Type

string

$_i18n

$_i18n : \midcom_services_i18n

A handle to the i18n service.

Type

\midcom_services_i18n

$_l10n

$_l10n : \midcom_services_i18n_l10n

The components' L10n string database.

Type

\midcom_services_i18n_l10n

$_l10n_midcom

$_l10n_midcom : \midcom_services_i18n_l10n

The global MidCOM string database.

Type

\midcom_services_i18n_l10n

$_config

$_config : \midcom_helper_configuration

The current configuration.

Type

\midcom_helper_configuration

$_services

$_services : array

Array that holds the already instantiated services

Type

array

$components

$components : array

The components for which we're creating the structure information

Type

array

$data

$data : 

Type

$snippet

$snippet : \midcom_db_snippet

The snippet we're working with

Type

\midcom_db_snippet

Methods

__construct()

__construct() 

__get()

__get(  $field) 

Parameters

$field

__isset()

__isset(  $field) 

Parameters

$field

set_active_leaf()

set_active_leaf(  $leaf_id) 

Parameters

$leaf_id

add_stylesheet()

add_stylesheet(string  $url, string  $media = false) 

Convenience shortcut for adding CSS files

Parameters

string $url

The stylesheet URL

string $media

The media type(s) for the stylesheet, if any

get_workflow()

get_workflow(string  $identifier, array  $options = array()) : \midcom\workflow\dialog

Parameters

string $identifier
array $options

Returns

\midcom\workflow\dialog

get_instance()

get_instance() 

node_exists()

node_exists(string  $component) 

Check if a node for a given component is available

Parameters

string $component

the component to look for

get_node_full_url()

get_node_full_url(string  $component) : mixed

Retrieve the full URL for the first topic of a given component

Parameters

string $component

the component to look for

Returns

mixed —

The component URL or false

get_node_relative_url()

get_node_relative_url(string  $component) : mixed

Retrieve the relative URL for the first topic of a given component

Parameters

string $component

The component to look for

Returns

mixed —

the component URL or false

get_node_guid()

get_node_guid(string  $component) : mixed

Retrieve the GUID for the first topic of a given component

Parameters

string $component

the component to look for

Returns

mixed —

the component URL or false

initialize_site_structure()

initialize_site_structure() 

load_snippet()

load_snippet() 

Save the configuration to the config snippet

get()

get(  $component,   $suffix) 

Parameters

$component
$suffix