Public Member Functions | Public Attributes

BeFrontHelper Class Reference

helper class for frontends More...

Inheritance diagram for BeFrontHelper:
AppHelper

List of all members.

Public Member Functions

 lang ()
 show 639-1 code, two letters, for html lang value should be in "frontendLangs" config array
 title ($order='asc')
 return title for current page if page is publication root => return <publication title>=""> (if 'contentRequested' return <publication title>=""> - <content title>="">) if page is a section => return <publication title>=""> - <section title>=""> [$order 'desc'] or <section title>=""> - <publication title>=""> [$order 'asc' default] (if 'contentRequested' return <section title>=""> - <content title>=""> [$order 'desc'] or <content title>=""> - <section title>=""> [$order 'asc' default])
 metaAlternate ($langs=true)
 Return meta alternate tags.
 metaDescription ()
 return html meta description.
 metaDc ()
 return html meta of dublin core meta data for current content (if present) or publication
 metaOg ()
 return html of OG meta data (Object Graph Metadata - for facebook)
 metaWebApp ($title=false, $icons=false, $statusBar=false, $tileColor= '#000', $feed=false)
 return html of common web-app metadata
 metaAll ($docType=null)
 return all html meta all meta = description, author, content, generator
 feeds ()
 return html meta for rss feeds
 seealso ()
 return currentContent seealso relation, if present.
 canonicalPath ()
 build <link rel="canonical"> canonical path tag of content/section selected
 chooseTemplate ($default="generic_section")
 choose a view template verifying if file exists.
 menu (array $tree, array $options=array())
 return an nested unordered list
 stats ()
 return publication stats code only if frontend app isn't staging site
 breadcrumb (array $options=array())
 return the breadcrumb trail
 stagingToolbar ()
 if frontend is a staging app then it shows a toolbar on the top of the page
 beforeRender ()
 helper beforeRender.

Public Attributes

 $helpers = array('Html', 'BeHtml')

Detailed Description

helper class for frontends

$Revision$ $LastChangedBy$ $LastChangedDate$ $Id$

Definition at line 33 of file be_front.php.


Member Function Documentation

BeFrontHelper::beforeRender (  ) 

helper beforeRender.

include js that staging toolbar needs, include css (backend and eventually frontend override), override css

Returns:
void

Definition at line 838 of file be_front.php.

BeFrontHelper::breadcrumb ( array $  options = array()  ) 

return the breadcrumb trail

Parameters:
array options, possible values are: "separator" => '' [default] text to separate crumbs "startText" => false [default] this will be the first crumb, if false it defaults to first crumb in array "classOn" => "crumbOn" [default] css class for current section "showPublication" => true [default] choose if publication is shown in breadcrumb
Returns:
string

Definition at line 786 of file be_front.php.

BeFrontHelper::canonicalPath (  ) 

build <link rel="canonical"> canonical path tag of content/section selected

Returns:
string

Definition at line 545 of file be_front.php.

BeFrontHelper::chooseTemplate ( default = "generic_section"  ) 

choose a view template verifying if file exists.

Test follow the order: 1) filename = frontendMap currentContent nickname 2) filename = frontendMap section nickname 3) filename = currentContent nickname 4) filename = section nickname 5) filename = parent sections nickname 6) filename = object type 7) default

Parameters:
string $default, default fallback template
Returns:
void

Definition at line 610 of file be_front.php.

BeFrontHelper::feeds (  ) 

return html meta for rss feeds

See also:
HtmlHelper
Returns:
string

Definition at line 521 of file be_front.php.

BeFrontHelper::lang (  ) 

show 639-1 code, two letters, for html lang value should be in "frontendLangs" config array

"eng" => array("en", "english"), "spa" => array("es", "espa&ntilde;ol"), "ita" => array("it", "italiano"), .....

Returns:
639-1 code if found, empty string otherwise

Definition at line 67 of file be_front.php.

BeFrontHelper::menu ( array $  tree,
array $  options = array() 
)

return an nested unordered list

Parameters:
array $tree section's tree (structure from FrontendController::loadSectionsTree is aspected)
array $options (defaukt values are visible in $defaultOptions array) "id" => id of main

=> css class of main

=> css class of nested

=> css class of "activeClass" => css class for selected

Returns:
string

Definition at line 713 of file be_front.php.

BeFrontHelper::metaAll ( docType = null  ) 

return all html meta all meta = description, author, content, generator

Parameters:
string $docType If not passed, tries to load `docType` from config. If this fails too, `xhtml-strict` is used.
Returns:
string
See also:
HtmlHelper

Definition at line 491 of file be_front.php.

References metaDescription().

BeFrontHelper::metaAlternate ( langs = true  ) 

Return meta alternate tags.

Parameters:
mixed $langs Alternate language(s) for current resource. If omitted or `=== true`, all languages specified in `$configure->frontendLangs` will be loaded.
Returns:
string

Definition at line 116 of file be_front.php.

BeFrontHelper::metaDc (  ) 

return html meta of dublin core meta data for current content (if present) or publication

DC fields:

DC.description DC.format DC.language DC.creator DC.publisher DC.date DC.modified DC.identifier DC.rights DC.license

See also:
HtmlHelper
Returns:
string

Definition at line 184 of file be_front.php.

BeFrontHelper::metaDescription (  ) 

return html meta description.

try to get description from: _currentContent ('description' or 'abstract' or 'body') _section['description'] _publication['description']

See also:
HtmlHelper
Returns:
string

Definition at line 157 of file be_front.php.

Referenced by metaAll().

BeFrontHelper::metaOg (  ) 

return html of OG meta data (Object Graph Metadata - for facebook)

Returns:
string

Definition at line 239 of file be_front.php.

BeFrontHelper::metaWebApp ( title = false,
icons = false,
statusBar = false,
tileColor = '#000',
feed = false 
)

return html of common web-app metadata

Parameters:
string $title, the application name
array $icons, an array of icons to use when the application is pinned in user home screen
string $statusBar, hex string color for status and navigation bars
string $tileColor, hex string for application name color (Windows)
string $feed, the nickname of the section to use as feed
Returns:
string

Definition at line 337 of file be_front.php.

BeFrontHelper::seealso (  ) 

return currentContent seealso relation, if present.

Returns:
string

Definition at line 536 of file be_front.php.

BeFrontHelper::stagingToolbar (  ) 

if frontend is a staging app then it shows a toolbar on the top of the page

Returns:
void

Definition at line 826 of file be_front.php.

BeFrontHelper::stats (  ) 

return publication stats code only if frontend app isn't staging site

Returns:
stats code or nothing

Definition at line 769 of file be_front.php.

BeFrontHelper::title ( order = 'asc'  ) 

return title for current page if page is publication root => return <publication title>=""> (if 'contentRequested' return <publication title>=""> - <content title>="">) if page is a section => return <publication title>=""> - <section title>=""> [$order 'desc'] or <section title>=""> - <publication title>=""> [$order 'asc' default] (if 'contentRequested' return <section title>=""> - <content title>=""> [$order 'desc'] or <content title>=""> - <section title>=""> [$order 'asc' default])

Parameters:
string $order can be 'asc' or 'desc'
Returns:
string

Definition at line 87 of file be_front.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