You are here

function CourseObjectBook::getNodeTypes in Course 7

Same name and namespace in other branches
  1. 6 modules/course_book/course_book.classes.inc \CourseObjectBook::getNodeTypes()
  2. 7.2 modules/course_book/course_book.classes.inc \CourseObjectBook::getNodeTypes()

Return a list of valid node types.

Return value

array An array with node type machine names.

Overrides CourseObjectNode::getNodeTypes

File

modules/course_book/course_book.classes.inc, line 14

Class

CourseObjectBook

Code

function getNodeTypes() {
  if (user_access('administer book outlines')) {
    return array_keys(node_type_get_names());
  }
  else {
    return variable_get('book_allowed_types', array(
      'book',
    ));
  }
}