You are here

function book_node_import_fields_alter in Node import 6

Implementation of hook_node_import_fields_alter().

File

supported/book.inc, line 46
Support file for the core book module.

Code

function book_node_import_fields_alter(&$fields, $type) {
  foreach ($fields as $fieldname => $fieldinfo) {
    switch ($fieldinfo['input_format']) {
      case 'book_reference':
        $fields[$fieldname]['preprocess'][] = 'node_import_check_book_reference';
        break;
      case 'book_page_reference':

        // Because the book page reference needs to know what book we are
        // adding the page to, we can't preprocess here, but need to do
        // it in book_node_import_values_alter().
        break;
    }
  }
}