C:/drupal/modules/book/book.pages.inc File Reference

Go to the source code of this file.


Functions

 book_render ()
 book_export ($type, $nid)
 book_export_html ($nid)
 book_outline ($node)
 book_outline_form (&$form_state, $node)
 book_remove_button_submit ($form, &$form_state)
 book_outline_form_submit ($form, &$form_state)
 book_remove_form (&$form_state, $node)
 book_remove_form_submit ($form, &$form_state)
 book_form_update ()


Detailed Description

User page callbacks for the book module.

Definition in file book.pages.inc.


Function Documentation

book_export ( type,
nid 
)

Menu callback; Generates various representation of a book page and its children.

The function delegates the generation of output to helper functions. The function name is derived by prepending 'book_export_' to the given output type. So, e.g., a type of 'html' results in a call to the function book_export_html().

Parameters:
$type A string encoding the type of output requested. The following types are currently supported in book module:
  • html: HTML (printer friendly output)

Other types may be supported in contributed modules.

Parameters:
$nid An integer representing the node id (nid) of the node to export
Returns:
A string representing the node and its children in the book hierarchy in a format determined by the $type parameter.

Definition at line 42 of file book.pages.inc.

References $type, drupal_not_found(), drupal_set_message(), drupal_strtolower(), print, and t().

Here is the call graph for this function:

book_export_html ( nid  ) 

This function is called by book_export() to generate HTML for export.

The given node is /embedded to its absolute depth in a top level section/. For example, a child node with depth 2 in the hierarchy is contained in (otherwise empty) <div> elements corresponding to depth 0 and depth 1. This is intended to support WYSIWYG output - e.g., level 3 sections always look like level 3 sections, no matter their depth relative to the node selected to be exported as printer-friendly HTML.

Parameters:
$nid An integer representing the node id (nid) of the node to export.
Returns:
A string containing HTML representing the node and its children in the book hierarchy.

Definition at line 73 of file book.pages.inc.

References drupal_access_denied(), and theme().

Here is the call graph for this function:

book_form_update (  ) 

AJAX callback to replace the book parent select options.

This function is called when the selected book is changed. It updates the cached form (either the node form or the book outline form) and returns rendered output to be used to replace the select containing the possible parent pages in the newly selected book.

Parameters:
$build_id The form's build_id.
$bid A bid from from among those in the form's book select.
Returns:
Prints the replacement HTML in JSON format.

Definition at line 234 of file book.pages.inc.

References $output, cache_get(), cache_set(), drupal_json(), drupal_render(), exit, and form_builder().

Here is the call graph for this function:

book_outline ( node  ) 

Menu callback; show the outline form for a single node.

Definition at line 92 of file book.pages.inc.

References check_plain(), drupal_get_form(), and drupal_set_title().

Here is the call graph for this function:

book_outline_form_submit ( form,
&$  form_state 
)

Handles book outline form submissions from the outline tab.

See also:
book_outline_form()

Definition at line 155 of file book.pages.inc.

References drupal_set_message(), and t().

Here is the call graph for this function:

book_remove_button_submit ( form,
&$  form_state 
)

Button submit function to redirect to removal confirm form.

See also:
book_outline_form()

Definition at line 146 of file book.pages.inc.

book_remove_form_submit ( form,
&$  form_state 
)

Confirm form submit function to remove a node from the book.

See also:
book_remove_form()

Definition at line 208 of file book.pages.inc.

References db_query(), drupal_set_message(), menu_link_delete(), nid, and t().

Here is the call graph for this function:

book_render (  ) 

Menu callback; prints a listing of all books.

Definition at line 12 of file book.pages.inc.

References l(), and theme().

Here is the call graph for this function:


Generated on Mon Jun 2 15:08:17 2008 for SimpleTest by  1.5.5