class apachesolr_context_page_condition in Apache Solr Search 7
Expose Apachesolr pages as a context condition.
Hierarchy
- class \context_condition
Expanded class hierarchy of apachesolr_context_page_condition
2 string references to 'apachesolr_context_page_condition'
- apachesolr_search_context_plugins in ./
apachesolr_search.module - Implements hook_context_plugins()
- apachesolr_search_context_registry in ./
apachesolr_search.module - Implements hook_context_registry().
File
- plugins/
context/ apachesolr_context_page_condition.inc, line 10 - Context integration for Apachesolr.
View source
class apachesolr_context_page_condition extends context_condition {
/**
* Override of condition_values().
*/
function condition_values() {
// Retrieve all Apachesolr pages to return a list of conditions.
$values = array();
foreach (apachesolr_search_load_all_search_pages() as $page) {
$values[$page['page_id']] = check_plain($page['label']);
}
return $values;
}
/**
* Override of execute().
*
* @param Array $search_page The loaded search page.
* Loaded in apachesolr_search_custom_page().
*/
function execute($search_page) {
foreach ($this
->get_contexts($search_page['page_id']) as $context) {
// Set contexts for this Apachesolr page.
$this
->condition_met($context, $search_page['page_id']);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
apachesolr_context_page_condition:: |
function |
Override of condition_values(). Overrides context_condition:: |
||
apachesolr_context_page_condition:: |
function | Override of execute(). | ||
context_condition:: |
property | |||
context_condition:: |
property | |||
context_condition:: |
property | |||
context_condition:: |
property | |||
context_condition:: |
function | Condition form. | 3 | |
context_condition:: |
function | Condition form submit handler. | 2 | |
context_condition:: |
function | Marks a context as having met this particular condition. | ||
context_condition:: |
function | Check whether this condition is used by any contexts. Can be used to prevent expensive condition checks from being triggered when no contexts use this condition. | ||
context_condition:: |
function | Context editor form for conditions. | 2 | |
context_condition:: |
function | Context editor form submit handler. | ||
context_condition:: |
function | Retrieve options from the context provided. | ||
context_condition:: |
function | Retrieve all contexts with the condition value provided. | 2 | |
context_condition:: |
function | Options form. Provide additional options for your condition. | 4 | |
context_condition:: |
function | Options form submit handler. | ||
context_condition:: |
function | Settings form. Provide variable settings for your condition. | ||
context_condition:: |
function | Clone our references when we're being cloned. | ||
context_condition:: |
function | Constructor. Do not override. |