context_condition_bookroot.inc

  1. cis7 sites/all/modules/ulmus/context/plugins/context_condition_bookroot.inc
  2. cle7 sites/all/modules/ulmus/context/plugins/context_condition_bookroot.inc
  3. ecd7 sites/all/modules/ulmus/context/plugins/context_condition_bookroot.inc
  4. elmsmedia7 sites/all/modules/ulmus/context/plugins/context_condition_bookroot.inc
  5. harmony7 sites/all/modules/ulmus/context/plugins/context_condition_bookroot.inc
  6. icor7 sites/all/modules/ulmus/context/plugins/context_condition_bookroot.inc
  7. meedjum_blog7 sites/all/modules/ulmus/context/plugins/context_condition_bookroot.inc
  8. mooc7 sites/all/modules/ulmus/context/plugins/context_condition_bookroot.inc

Classes

Namesort descending Description
context_condition_bookroot Set the context on the basis of the node type of page's book root.

File

sites/all/modules/ulmus/context/plugins/context_condition_bookroot.inc
View source
  1. <?php
  2. /**
  3. * Set the context on the basis of the node type of page's book root.
  4. */
  5. class context_condition_bookroot extends context_condition_node {
  6. function execute($node, $op) {
  7. if ($this->condition_used() && !empty($node->book['bid'])) {
  8. $type = db_select('node')
  9. ->fields('node', array('type'))
  10. ->condition('nid', $node->book['nid'])
  11. ->execute()
  12. ->fetchField();
  13. $book = new stdClass();
  14. $book->type = $type;
  15. parent::execute($book, $op);
  16. }
  17. }
  18. }
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.