You are here

function space_type_purl::deactivate in Spaces 6.3

Same name and namespace in other branches
  1. 7.3 plugins/space_type_purl.inc \space_type_purl::deactivate()
  2. 7 plugins/space_type_purl.inc \space_type_purl::deactivate()

Override of deactivate(). Ensure that the PURL modifier is not present when the space is not active.

Overrides space::deactivate

2 calls to space_type_purl::deactivate()
space_og::router in spaces_og/plugins/space_og.inc
Implementation of space->router().
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 57

Class

space_type_purl
Common functionality for space types that use a PURL modifier to trigger their activation. Examples: space_og, space_taxonomy.

Code

function deactivate() {
  $this
    ->purge_request_destination();
  purl_goto($_GET['q'], array(
    'query' => drupal_query_string_encode($_GET, array(
      'q',
    )),
    'purl' => array(
      'remove' => array(
        "spaces_{$this->type}",
      ),
    ),
  ));
}