Squiz Matrix
4.12.2
|
Public Member Functions | |
__construct () | |
paintBackend (&$o) | |
paintSummary (Backend_Outputter $o, Array $contexts, $write_access, $current_context=NULL) | |
paintSelectedContext (Backend_Outputter $o, Array $contexts, $current_context) | |
processSelectedContext (Backend_Outputter $o, Array $contexts, $current_context) | |
paintMatchOrder (Backend_Outputter $o, Array $match_order, $write_access) | |
processMatchOrder (Backend_Outputter $o, Array $match_order) | |
processBackend (Backend_Outputter $o) | |
load () | |
save ($vars, $backup_existing=FALSE) | |
Public Member Functions inherited from Config | |
__construct () | |
save ($vars, $backup_existing=FALSE, $send_message=TRUE) | |
acquireLock () | |
canAcquireLock () | |
releaseLock () | |
updateLock () | |
getLockInfo () | |
writeAccess () | |
paintBackend (&$o) | |
processBackend (&$o) | |
Public Member Functions inherited from MySource_Object | |
MySource_Object () | |
__sleep () | |
__wakeup () | |
Data Fields | |
$config_vars | |
$prefix = 'config_context_' | |
$new_vars = NULL | |
Data Fields inherited from Config | |
$config_vars = Array() | |
$config_file = '' | |
$name = '' | |
Data Fields inherited from MySource_Object | |
$_tmp | |
Protected Member Functions | |
_getReorderJS () | |
_getSummaryConditionList ($conditions) | |
_getContextErrors ($context) | |
_paintConditionsList (Backend_Outputter $o, $conditions) | |
_paintCondition (Backend_Outputter $o, $conditions, $condition_id) | |
_processCondition ($condition_id, $condition_type, &$condition_options) | |
_getAcceptLanguageOptions () | |
Protected Member Functions inherited from Config | |
_paintConfigVar ($var_name, $value, $var_export=TRUE) | |
Definition at line 39 of file context_config.inc.
__construct | ( | ) |
|
protected |
|
protected |
Returns a list of errors with this context
If the context is valid, no errors will be returned (the return will be empty array). If the return is not empty, assume the context is NOT valid.
Context errors will be keyed in two ways: 'context' Whole-of-context-level errors. (for instance, requiring "at least 3" with only two conditions)
'condition' Condition-level errors caused by a combination of conditions. For instance, conditions that negate each other.
integer key Condition-level errors affecting a single condition. Key is the condition ID.
The splitting of context errors by condition allows the paint functions to paint the errors next to/underneath the condition to which it applies.
array | $context | Details of a context |
Definition at line 601 of file context_config.inc.
|
protected |
Return fragment code required for reordering the conditions
This script creates a top-level "ContextConfig" object, containing the required code. To set up the reordering in the backend, use: $o->addOnLoad('ContextConfig.setup();'); Where $o is a Backend_Outputter object.
Definition at line 430 of file context_config.inc.
|
protected |
Generates a human-readable summary from the condition list of a contexts
Returns an array of readable condition summaries. This can then be styled as desired in the summary table.
array | $conditions | The list of conditions |
Definition at line 525 of file context_config.inc.
|
protected |
Paints a single condition's interface
Backend_Outputter | $o | The outputter class for this editing interface |
array | $conditions | The list of the conditions, in no particular order |
int | $condition_id | The condition currently being painted |
Definition at line 794 of file context_config.inc.
|
protected |
Paints a table of conditions for an alternate context
Backend_Outputter | $o | The outputter class for this editing interface |
array | $conditions | The list of the conditions, in no particular order |
Definition at line 746 of file context_config.inc.
|
protected |
Process a single condition
int | $condition_id | The ID of the condition being processed - used mainly for POST vars |
string | $condition_type | The type of condition we are processing |
array | &$condition_options | Options for this condition - can be processed in place |
Definition at line 1346 of file context_config.inc.
load | ( | ) |
paintBackend | ( | & | $o | ) |
Paints the interface for our config options.
If you (as a sub-class) put your config vars so that when they are submitted appear in $_POST[get_class($this)] then you probably won't need to override processBackend()
object | &$o | Backend_Outputter, reference to the backend outputter |
Definition at line 98 of file context_config.inc.
paintMatchOrder | ( | Backend_Outputter | $o, |
Array | $match_order, | ||
$write_access | |||
) |
Paints the edit interface for changing the context matching order
Backend_Outputter | $o | The backend outputter being used |
array | $match_order | The current matching order list (ie. SQ_CONTEXT_MATCH_ORDER) |
boolean | $write_access | TRUE if write access available |
Definition at line 1043 of file context_config.inc.
paintSelectedContext | ( | Backend_Outputter | $o, |
Array | $contexts, | ||
$current_context | |||
) |
Paints the edit interface for the currently selected context
Note: Write access is not sent to this function since it is only displayed when you are able to edit a context, ie. write access must be TRUE.
Backend_Outputter | $o | The backend outputter being used |
array | $contexts | The list of currently available contexts (ie. SQ_CONTEXT_DEFINITIONS) |
int | $current_context | The context being edited |
Definition at line 661 of file context_config.inc.
paintSummary | ( | Backend_Outputter | $o, |
Array | $contexts, | ||
$write_access, | |||
$current_context = NULL |
|||
) |
Paints the summary of contexts, and interface to allow select one for editing
Backend_Outputter | $o | The backend outputter being used |
array | $contexts | The list of currently available contexts (ie. SQ_CONTEXT_DEFINITIONS) |
boolean | $write_access | TRUE if write access available |
int | $current_context | Currently selected context. Used for highlighting the selection being edited. |
Definition at line 167 of file context_config.inc.
processBackend | ( | Backend_Outputter | $o | ) |
Process the entire screen
Backend_Outputter | $o | The backend |
array | $match_order | The current matching order list (ie. SQ_CONTEXT_MATCH_ORDER) |
Definition at line 1073 of file context_config.inc.
processMatchOrder | ( | Backend_Outputter | $o, |
Array | $match_order | ||
) |
Processes the edit interface for changing the context matching order
Backend_Outputter | $o | The backend outputter being used |
array | $match_order | The current matching order list (ie. SQ_CONTEXT_MATCH_ORDER) |
Definition at line 1058 of file context_config.inc.
processSelectedContext | ( | Backend_Outputter | $o, |
Array | $contexts, | ||
$current_context | |||
) |
Processes the edit interface for the currently selected context
Backend_Outputter | $o | The backend outputter being used |
array | $contexts | The list of currently available contexts (ie. SQ_CONTEXT_DEFINITIONS) |
int | $current_context | The context being edited |
Definition at line 1027 of file context_config.inc.
save | ( | $vars, | |
$backup_existing = FALSE |
|||
) |
Rewrites the configuration with current variables
This needs to be completely overridden since this config will save to DB rather than to config file. Since we control processBackend() here, this is completely fine.
Returns TRUE on successful write to DB, FALSE otherwise.
array | $vars | an array with the new set of variables Array(string => mixed) |
boolean | $backup_existing | Ignored here as we don't have a config file |
Definition at line 1453 of file context_config.inc.
$config_vars |
Definition at line 46 of file context_config.inc.