Public Member Functions | Public Attributes | Protected Attributes

BeTreeHelper Class Reference

BEdita tree of contents helper. More...

Inheritance diagram for BeTreeHelper:
AppHelper

List of all members.

Public Member Functions

 beforeRender ()
 beforeRender callback initialize BeTree::treeParams to $this->params
 setTreeParams (array $params)
 Merge BeTree::treeParams with array of params you can use it to override some params used to build url in the rel attribute inside tree items.
 resetTreeParams ()
 set BeTree::treeParams to $this->params
 optionsMobile ($tree, $options=array())
 build option for select
 designBranchMobile ($branch, $inputType=null, $parent_ids=array())
 get html section
 view ($tree=array(), $inputType=null, $parent_ids=array())
 output a tree
 sitemap ($sections=array(), $public_url='/')
 output sitemap tree
 option ($tree, $selId=null, $numInd=1, $indentation="    ")
 build option for select

Public Attributes

 $helpers = array("Html", "SessionFilter")
 $tags

Protected Attributes

 $treeParams = array()

Detailed Description

BEdita tree of contents helper.

Version:
$Revision$ $LastChangedBy$ $LastChangedDate$

$Id$

Definition at line 31 of file be_tree.php.


Member Function Documentation

BeTreeHelper::designBranchMobile ( branch,
inputType = null,
parent_ids = array() 
)

get html section

Parameters:
array $branch, section
string $inputType, type of input to prepend to section name (checkbox, radio)
array $parent_ids, array of ids parent
Returns:
string html for section simple tree

Definition at line 176 of file be_tree.php.

BeTreeHelper::option ( tree,
selId = null,
numInd = 1,
indentation = "    " 
)

build option for select

Parameters:
array $tree
int $numInd number of $indentation repetition foreach branch
string $indentation string to use for indentation
Returns:
string <option value="">...</option> <option value="">...</option> ....

Definition at line 391 of file be_tree.php.

Referenced by view().

BeTreeHelper::optionsMobile ( tree,
options = array() 
)

build option for select

Parameters:
array $tree
int $numInd number of $indentation repetition foreach branch
string $indentation string to use for indentation
Returns:
string <option value="">...</option> <option value="">...</option> ....

Definition at line 86 of file be_tree.php.

BeTreeHelper::setTreeParams ( array $  params  ) 

Merge BeTree::treeParams with array of params you can use it to override some params used to build url in the rel attribute inside tree items.

For example: url is build using $treeParams['controller'] and treeParams['action']. If you want tree items go to another controller you have to call BeTree::setTreeParams() before building the tree. From view file call {$beTree->setTreeParams(['controller' => 'myController'])}

Parameters:
array $params

Definition at line 64 of file be_tree.php.

BeTreeHelper::sitemap ( sections = array(),
public_url = '/' 
)

output sitemap tree

Parameters:
array $sections, sections tree
string $public_url, public url of publication
Returns:
string html for sitemap

Definition at line 323 of file be_tree.php.

BeTreeHelper::view ( tree = array(),
inputType = null,
parent_ids = array() 
)

output a tree

Parameters:
array $tree, publications tree
string $inputType, type of input to prepend to section name (checkbox, radio)
array $parent_ids, array of ids parent
Returns:
string html for simple view tree

Definition at line 239 of file be_tree.php.

References option().


Member Data Documentation

BeTreeHelper::$tags
Initial value:
 array(
        'option'    => "<option value=\"%s\"%s>%s</option>",
        'checkbox'  => "<input type=\"checkbox\" name=\"data[destination][]\" value=\"%s\" %s/>",
        'radio' => "<input type=\"radio\" name=\"data[destination]\" value=\"%s\" %s/>",
    )

Definition at line 39 of file be_tree.php.


The documentation for this class was generated from the following file:
Generated on Fri Dec 11 2015 15:29:46 by Doxygen 1.7.1  BEditaBEdita 3.7 Corylus