class FacetapiWidgetCheckboxLinks in Facet API 7
Same name and namespace in other branches
- 6.3 plugins/facetapi/widget_links.inc \FacetapiWidgetCheckboxLinks
- 7.2 plugins/facetapi/widget_links.inc \FacetapiWidgetCheckboxLinks
Widget that renders facets as a list of clickable checkboxes.
This widget renders facets in the same way as FacetapiWidgetLinks but uses JavaScript to transform the links into checkboxes followed by the facet.
Hierarchy
- class \FacetapiWidget
- class \FacetapiWidgetLinks
- class \FacetapiWidgetCheckboxLinks
- class \FacetapiWidgetLinks
Expanded class hierarchy of FacetapiWidgetCheckboxLinks
1 string reference to 'FacetapiWidgetCheckboxLinks'
- facetapi_facetapi_widgets in ./
facetapi.facetapi.inc - Implements hook_facetapi_widgets().
File
- plugins/
facetapi/ widget_links.inc, line 290 - The facetapi_links and facetapi_checkbox_links widget plugin classes.
View source
class FacetapiWidgetCheckboxLinks extends FacetapiWidgetLinks {
/**
* Overrides FacetapiWidgetLinks::init().
*
* Adds additional JavaScript settings and CSS.
*/
public function init() {
parent::init();
$this->jsSettings['makeCheckboxes'] = 1;
drupal_add_css(drupal_get_path('module', 'facetapi') . '/facetapi.css');
}
/**
* Overrides FacetapiWidgetLinks::getItemClasses().
*
* Sets the base class for checkbox facet items.
*/
public function getItemClasses() {
return array(
'facetapi-checkbox',
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FacetapiWidget:: |
protected | property | The render that alterations are being applied to. | |
FacetapiWidget:: |
protected | property | The facet object containing the facet definition and required contexts. | |
FacetapiWidget:: |
protected | property | The machine name of the plugin associated with this instance. | |
FacetapiWidget:: |
protected | property | The widget's JavaScript settings that are passed to drupal_add_js(). | |
FacetapiWidget:: |
protected | property | The key of the facet's render array added to the realm's render array. | |
FacetapiWidget:: |
protected | property | The realm definition as returned by facetapi_realm_load(). | |
FacetapiWidget:: |
protected | property | An array of facet settings. | |
FacetapiWidget:: |
protected | function | Applies the sorts to the facet items recursively. | |
FacetapiWidget:: |
public | function | Returns the altered render array acted on by FacetapiWidget::execute(). | |
FacetapiWidget:: |
public | function | Gets the machine name of the plugin. | |
FacetapiWidget:: |
public | function | Returns the JavaScript settings that are passed to drupal_add_js(). | |
FacetapiWidget:: |
public | function | Gets key used to append FacetapiWidget::build to the realm's render array. | |
FacetapiWidget:: |
protected | function | Applies sort information via the callback in the sort definition. | |
FacetapiWidget:: |
function | Applies sorting algorithms to the items in the facet's render array. | ||
FacetapiWidgetCheckboxLinks:: |
public | function |
Overrides FacetapiWidgetLinks::getItemClasses(). Overrides FacetapiWidgetLinks:: |
|
FacetapiWidgetCheckboxLinks:: |
public | function |
Overrides FacetapiWidgetLinks::init(). Overrides FacetapiWidget:: |
|
FacetapiWidgetLinks:: |
function | Transforms the render array for use with theme_item_list(). | ||
FacetapiWidgetLinks:: |
public | function |
Implements FacetapiWidget::execute(). Overrides FacetapiWidget:: |
|
FacetapiWidgetLinks:: |
function |
Overrides FacetapiWidget::getDefaultSettings(). Overrides FacetapiWidget:: |
||
FacetapiWidgetLinks:: |
protected | function | Recursive function that sets each item's theme hook. | |
FacetapiWidgetLinks:: |
function |
Overrides FacetapiWidget::settingsForm(). Overrides FacetapiWidget:: |
||
FacetapiWidgetLinks:: |
public | function |
Overrides FacetapiWidget::__construct(). Overrides FacetapiWidget:: |