Fuel User Guide Class
This class extends the Fuel_advanced_module class.
Properties Reference
Property | Default Value | Description |
---|---|---|
public | ||
use_search | 1 | Whether to display the search at the top |
use_breadcrumb | 1 | Whether to display the breadcrumb |
use_nav | 1 | Whether to display the TOC navigation |
use_footer | 1 | Whether to display the footer |
display_options |
array('use_search' => 1, 'use_breadcrumb' => 1, 'use_nav' => 1, 'user_footer' => 1, ) |
|
valid_folders |
array('libraries', 'helpers', 'general', 'models', 'core') |
Valid folders for autom documentation |
preload_classes |
array() |
|
protected | ||
current_page | N/A | |
_examples | N/A |
Function Reference [+]
$this->fuel->user_guide->initialize([$params=array()])
Initialize the page analysis object. Accepts an associative array as input, containing backup preferences. Also will set the values in the config as properties of this object.
Returns
void
Parameters
(array) $params config preferences
$this->fuel->user_guide->init_page()
Initializes the user guide page.
Returns
void
$this->fuel->user_guide->current_page()
Returns the current user guide page.
Returns
string
$this->fuel->user_guide->set_current_page('$page')
Sets the current user guide page.
Returns
void
Parameters
(string) $page The name of the display option
$this->fuel->user_guide->page_segment('$segment')
Returns user guide page segment.
Returns
mixed
Parameters
(int) $segment The segment to return
$this->fuel->user_guide->page_title('$page')
Gets the current page title based on the H1 value in the page.
Returns
string
Parameters
(string) $page The html of a user guide page
$this->fuel->user_guide->breadcrumb(['$page'=NULL])
Returns user guide page segment.
Returns
mixed
Parameters
(string) $page The html of a user guide page
$this->fuel->user_guide->get_vars(['$page'=NULL])
Returns an array of page variables which determines whether to display things like the search area, breadcrumb, top navigation and the footer.
Returns
array
Parameters
(string) $page The html of a user guide page
$this->fuel->user_guide->set_display_option('$opt', '$val')
Returns a single display option.
Returns
void
Parameters
(string) $opt The name of the display option (boolean) $val A TRUE/FALSE value which determines whether to display a certain area
$this->fuel->user_guide->display_option(['$opt'=NULL])
Returns a single display option.
Returns
array
Parameters
(string) $opt The display option key (optional)
$this->fuel->user_guide->display_options()
Returns the all the various display options as an array:.
- use_search
- use_breadcrumb
- use_nav
- use_footer
Returns
array
$this->fuel->user_guide->generate_docs('$file', ['$folder'='libraries'], ['$module'=NULL], [$vars=array()])
Generates the class documentation based on the class passed to it.
Returns
string
Parameters
(string) $file Name of class (string) $folder Module folder name (optional) (string) $module Subfolder in module. Deafult is the libraries (optional) (array) $vars Variables to be passed to the layout (optional)
Example
$vars = array('intro'); echo generate_class_docs('Fuel_cache', $vars);
$this->fuel->user_guide->generate_toc(['$folder'=NULL], ['$module'=NULL], [$exclude=array()], ['$return_array'=FALSE])
Returns a table of contents for your documentation.
Returns
string
Parameters
(stirng) $folder The name of the folder to generate the table of contents. If no folder is provided, it will look in the libraries, helpers and models folders (string) $module Module folder name (optional) (array) $exclude An array of files to exclude from the list (optional) (boolean) $return_array Whether to return an array of values or a view (optional)
$this->fuel->user_guide->generate_config_info(['$module'=NULL], ['$return_array'=FALSE])
Returns a a table of contents for your documentation.
Returns
mixed
Parameters
(string) $module Module folder name (optional) (boolean) $return_array Whether to return an array of values or a view (optional)
$this->fuel->user_guide->folder_files('$folder', ['$module'=NULL], [$exclude=array()])
Returns an array with the keys as links and the values as the name of the file.
Returns
array
Parameters
(stirng) $folder The name of the folder relative to the MODULES_PATH (string) $module Module folder name (optional) (array) $exclude An array of files to exclude from the list (optional)
$this->fuel->user_guide->block('$block', [$vars=array()], ['$return'=TRUE])
Returns a single display option.
Returns
array
Parameters
(string) $block The name of the a block to display (array) $vars An array of variables to pass to the block (optional) (boolean) $return A TRUE/FALSE value which determines whether to return the block as a string (TRUE) or send it to the output (FALSE)
$this->fuel->user_guide->set_example('$func', '$example')
Sets an example for a specific method/function.
Returns
void
Parameters
(stirng) $func The name of the method/function (string) $example The example to associate with the method/function