protected function space_type_purl::verify_purl in Spaces 6.3
Same name and namespace in other branches
- 7.3 plugins/space_type_purl.inc \space_type_purl::verify_purl()
- 7 plugins/space_type_purl.inc \space_type_purl::verify_purl()
Verify that this space's PURL modifier is present for the current page request.
1 call to space_type_purl::verify_purl()
- space_type_purl::activate in plugins/
space_type_purl.inc - Override of activate(). Ensure that the PURL modifier is present when the space is active.
File
- plugins/
space_type_purl.inc, line 12
Class
- space_type_purl
- Common functionality for space types that use a PURL modifier to trigger their activation. Examples: space_og, space_taxonomy.
Code
protected function verify_purl() {
$method = variable_get("purl_method_spaces_{$this->type}", 'path');
$elements = purl_active()
->get($method);
foreach ($elements as $element) {
if ($element->provider == "spaces_{$this->type}" && $element->id == $this->id) {
return TRUE;
}
}
return FALSE;
}