book_type_is_allowed

book_type_is_allowed($type)

Determines if a given node type is in the list of types allowed for books.

Parameters

string $type: A node type.

Return value

bool A Boolean TRUE if the node type can be included in books; otherwise, FALSE.

File

core/modules/book/book.module, line 509
Allows users to create and organize related content in an outline.

Code

function book_type_is_allowed($type) {
  return in_array($type, \Drupal::config('book.settings')->get('allowed_types'));
}
doc_Drupal
2016-10-29 08:48:39
Comments
Leave a Comment

Please login to continue.