BEdita API doc | 4-cactus
  • Class
  • Tree
  • Deprecated
  • Download

Classes

  • Addon
  • AddressbookController
  • AddressbookShell
  • AdminController
  • Alias
  • Annotation
  • ApiAuthComponent
  • ApiBaseController
  • ApiFormatterComponent
  • ApiUploadComponent
  • ApiValidatorComponent
  • AppController
  • AppError
  • AppHelper
  • Application
  • AppModel
  • Area
  • AreasController
  • Audio
  • AuthenticationsController
  • BannedIp
  • BEAppModel
  • BEAppObjectModel
  • BeAuthComponent
  • BeAuthFacebookComponent
  • BeAuthGoogleComponent
  • BeAuthTwitterComponent
  • BeCallbackManager
  • BeConfigure
  • BeCustomPropertyComponent
  • BeditaAnnotationModel
  • BeditaBaseShell
  • BeditaCollectionModel
  • BeditaContentModel
  • BeditaExportFilter
  • BeditaImportFilter
  • BeditaObjectModel
  • BeditaProductModel
  • BeditaShell
  • BeditaSimpleObjectModel
  • BeditaSimpleStreamModel
  • BeditaStreamModel
  • BeEmbedFlashHelper
  • BeEmbedHtml5Helper
  • BeEmbedMediaHelper
  • BeErrorCode
  • BeExceptionHandler
  • BEFile
  • BeFileHandlerComponent
  • BeFormHelper
  • BeFrontHelper
  • BeHashComponent
  • BeHtmlHelper
  • BeLangTextComponent
  • BeLib
  • BeMailComponent
  • BEObject
  • BeObjectCache
  • BePaginatorToolbarHelper
  • BeSchema
  • BeSecurityComponent
  • BeSystem
  • BeSystemComponent
  • BeThumb
  • BeTimeHelper
  • BeToolbarHelper
  • BeTreeComponent
  • BeTreeHelper
  • BeUploadToObjComponent
  • BeurlHelper
  • BeVimeoComponent
  • BeYoutubeComponent
  • BuildFilterBehavior
  • CacheableBehavior
  • CacheShell
  • CallbackBehavior
  • CaptchaComponent
  • Caption
  • CaptionsBehavior
  • Card
  • CardsImportFilter
  • Category
  • CleanupDataTask
  • CleanupTask
  • Comment
  • CommentsController
  • CompactResultBehavior
  • Content
  • CreateIndexFieldsBehavior
  • DataShell
  • DataTransfer
  • DateItem
  • DbadminShell
  • DeleteDependentObjectBehavior
  • DeleteObjectBehavior
  • DeployShell
  • Document
  • DocumentsController
  • DumpModel
  • EditorialContentsShell
  • EditorNote
  • Event
  • EventLog
  • EventsController
  • FilesController
  • ForeignDependenceSaveBehavior
  • FrontendController
  • FrontendShell
  • GalleriesController
  • Gallery
  • GeoTag
  • GettextShell
  • Git
  • GravatarHelper
  • Group
  • HashJob
  • History
  • HomeController
  • Image
  • ImageInfoHelper
  • JsonExportFilter
  • JsonImportFilter
  • JsonView
  • LangText
  • Link
  • MailGroup
  • MailGroupCard
  • MailJob
  • MailLog
  • MailMessage
  • MailShell
  • MailTemplate
  • Mask
  • MediaShell
  • MigrateDumpModel
  • MigrateShell
  • Migration
  • MigrationBase
  • MigrationDateItemsShell
  • Module
  • ModulesController
  • ModuleShell
  • MultimediaController
  • NewsController
  • NewsletterController
  • NewsletterShell
  • NotifyBehavior
  • ObjectEditor
  • ObjectProperty
  • ObjectRelation
  • ObjectType
  • ObjectUser
  • PagesController
  • Permission
  • PermissionModule
  • PermsHelper
  • Product
  • Property
  • PropertyOption
  • PublicationShell
  • RedisShell
  • RelationCheck
  • RelationRepair
  • RelationShell
  • RelationStats
  • RemoveDummyNameBehavior
  • ResponseHandlerComponent
  • RestClientModel
  • Revision
  • RevisionObjectBehavior
  • SearchText
  • SearchTextSaveBehavior
  • Section
  • SectionDummy
  • SessionFilterComponent
  • SessionFilterHelper
  • ShortNews
  • SmartyView
  • SoapClientModel
  • SplitterSql
  • StatisticsController
  • Stream
  • StreamLog
  • StreamsController
  • Svn
  • TagsController
  • ThemeSmartyView
  • ThumbnailHelper
  • ThumbShell
  • TransactionComponent
  • TransactionFS
  • TranslationsController
  • Tree
  • TrHelper
  • User
  • UserProperty
  • UsersController
  • Utility
  • Version
  • Video
  • VimeoHelper
  • WebmarksController
  • XmlExportFilter
  • XmlImportFilter
  • XmlJsonConverter
  • XmlView
  • YoutubeHelper

Interfaces

  • ApiAuthInterface
  • MediaProviderInterface
  • UploadableInterface

Exceptions

  • BeditaAjaxException
  • BEditaAllowURLException
  • BeditaBadRequestException
  • BeditaConflictException
  • BEditaDeleteStreamObjException
  • BeditaException
  • BEditaFileExistException
  • BeditaForbiddenException
  • BeditaFrontAccessException
  • BeditaHashException
  • BEditaInfoException
  • BeditaInternalErrorException
  • BEditaIOException
  • BeditaLengthRequiredException
  • BeditaMailException
  • BEditaMediaProviderException
  • BeditaMethodNotAllowedException
  • BEditaMIMEException
  • BeditaNotFoundException
  • BeditaNotImplementedException
  • BeditaPublicationException
  • BeditaRuntimeException
  • BEditaSaveStreamObjException
  • BeditaServiceUnavailableException
  • BeditaUnauthorizedException
  • BEditaUploadPHPException
  • BEditaURLException

Class FrontendController

Controller base class for backends+frontends

Controller
Extended by AppController
Extended by FrontendController

Direct known subclasses

ApiBaseController

Abstract
Located at controllers/frontend_controller.php

Methods summary

protected mixed
# checkLogin( )

set FrontendController::logged private attribute

set FrontendController::logged private attribute

check if there's an active session and try to login if user not logged - if "authorizedGroups" array defined in frontend.ini.php, user has to be in one of those groups - if "staging" is defined only backend authorized groups are permitted - otherwise any group is accepted

Returns

mixed

Overrides

AppController::checkLogin
public
# login( string $backName = null )

show login form or redirect if user is already logged

show login form or redirect if user is already logged

Parameters

$backName
nickname or id of section to go after login
public
# logout( boolean $autoRedirect = true )

perform logout operation

perform logout operation

Parameters

$autoRedirect
protected
# accessDenied( string $type )

manage access denied. If you want another behavior override it in pages_controller

manage access denied. If you want another behavior override it in pages_controller

user unlogged: render login view (if user doesn't arrive from login page set info message) user unauthorized to access that item: render unauthorized view (set error message)

for other custom type will try to render a view with $type name (i.e. $type="access_denied" render views/pages/access_denied.[tpl|ctp] template)

Parameters

$type
$type, which type of access denied

Throws

BeditaFrontAccessException
protected boolean
# isLogged( )

get private logged var

get private logged var

Returns

boolean
final protected
# initAttributes( )

called before action to initialize $uses & $components array don't work... (abstract class ??)

called before action to initialize $uses & $components array don't work... (abstract class ??)

Throws

BeditaPublicationException

See

bedita-app/AppController#initAttributes()

Overrides

AppController::initAttributes
protected
# publicationDisabled( string $status )

Render off.tpl (or draft.tpl) layout when publication is disabled (off or draft)

Render off.tpl (or draft.tpl) layout when publication is disabled (off or draft)

Parameters

$status
the status to render
protected
# checkPublicationPermissions( )
protected
# setupLocale( )

override AppController::setupLocale. Used setup specific locale

override AppController::setupLocale. Used setup specific locale

See

bedita-app/AppController#setupLocale()

Overrides

AppController::setupLocale
protected
# lang( string $lang )

change language

change language

Parameters

$lang

Throws

BeditaException
protected boolean,
# checkPubblicationDate( array $obj )

check if current date is compatible with required pubblication dates (start/end date)

check if current date is compatible with required pubblication dates (start/end date)

Parameters

$obj

Returns

boolean,
true if content may be published, false otherwise
public static AppError
# handleExceptions( Exception $ex )

handle Exceptions

handle Exceptions

Deprecated

Parameters

$ex

Returns

AppError
protected
# treeChildrenCache( $id = null, $status = null, $filter = false, $order = 'priority', $dir = true, $page = 1, $dim = null, $excludeIds = array() )
protected array
# loadSectionsTree( string|integer $parentName, boolean $loadContents = false, array $exclude_nicknames = array(), integer $depth = null, $flatMode = false )

Get tree starting from specified section or area

Get tree starting from specified section or area

Parameters

$parentName
parent nickname or id
$loadContents
if it's true load all contents too. Default false
$exclude_nicknames
list exclude sections
$depth
tree's depth level (default=null => all levels)
$flatMode

Returns

array
protected
# setCanonicalPath( array & $obj )

Set canonical path in object data array, check parent authorization - $obj["canonicalPath"] will contain new caclulated canonical path - update $this->objectCache - setup $obj["parentAuthorized"] - setup $obj["pathSection"] for sections

Set canonical path in object data array, check parent authorization - $obj["canonicalPath"] will contain new caclulated canonical path - update $this->objectCache - setup $obj["parentAuthorized"] - setup $obj["pathSection"] for sections

Parameters

$obj
$obj, containing at least "id" and "nickname"
protected array
# loadSectionsLevels( string $secName, boolean $loadContents = false, array $exclude_nicknames = null )

Get sections levels

Get sections levels

Find all ancestors from secName and build an array of levels Each key in array returned is a level: 0 is the first level 1 is the second level etc...

set selected = true in a section if it's an ancestor (parent) of $secName

Parameters

$secName
nickname or section id
$loadContents
true meaning it loads all contents of each section
$exclude_nicknames
list exclude sections

Returns

array
of level selected
protected
# loadPublications( string $tplVar = null )

load all publications

load all publications

Parameters

$tplVar

$tplVar, var name for template. If not defined result will be set to "publicationsList" var

private integer
# getFirstSection( )

Gets the ID of the first section in the current publication.

Gets the ID of the first section in the current publication.

Returns

integer
First section's ID.
public
# homePage( )

find first active section and load it as home page section if any section was found load publication as home page section

find first active section and load it as home page section if any section was found load publication as home page section

public
# sitemapXml( )

prepare an XML containing sitemap specification view in bedita-app/views/pages/sitemap_xml.tpl

prepare an XML containing sitemap specification view in bedita-app/views/pages/sitemap_xml.tpl

public array
# sitemap( boolean $xml_out = false )

build array for sitemap

build array for sitemap

Parameters

$xml_out

Returns

array
public
# rss( string $sectionName )

Publish RSS feed with contents inside section $sectionName Use callback controller methods (if defined): - $sectionName."RssChannel" to fetch channel data - $sectionName."RssItems" to fetch rss items

Publish RSS feed with contents inside section $sectionName Use callback controller methods (if defined): - $sectionName."RssChannel" to fetch channel data - $sectionName."RssItems" to fetch rss items

If callbacks methods are not defined (default) load section and object data and build rss data with defaults

Parameters

$sectionName
$sectionName, section's nickname/unique name
protected array
# buildRssItem( array & $obj, string $canonicalPath = null )

Build a single RSS item from a BE object array If section "canonicalPath" is set, links are created with it If not: use object canonicalPath if present, otherwise object unique name (nickname)

Build a single RSS item from a BE object array If section "canonicalPath" is set, links are created with it If not: use object canonicalPath if present, otherwise object unique name (nickname)

Parameters

$obj
$canonicalPath

Returns

array
public
# kml( string $sectionName )

output a kml defined by a section

output a kml defined by a section

Parameters

$sectionName
public
# georssatom( string $sectionName )

output a georss atom representation of section

output a georss atom representation of section

Parameters

$sectionName
public
# georss( string $sectionName )

output a georss representation of section

output a georss representation of section

Parameters

$sectionName
public string|integer
# json( string $name )

output a json object of returned array by section or content method

output a json object of returned array by section or content method

Parameters

$name

Returns

string|integer
$name, nickname or id
public
# xml( string|integer $name )

output an xml of returned array by section or content method

output an xml of returned array by section or content method

passing a "format" named parameters in the url obtain an xml "attributes" format or an xml "tags" format i.e. http://www.example.com/xml/nickname/format:tags output a tag style xml default is defined by class attribute xmlFormat

Parameters

$name
$name, nickname or id
public
# xmlobject( string|integer $name )

output an xml of returned array by loadObj/loadObjByNick method

output an xml of returned array by loadObj/loadObjByNick method

passing a "format" named parameters in the url obtain an xml "attributes" format or an xml "tags" format i.e. http://www.example.com/xmlobject/nickname/format:tags output a tag style xml default is defined by class attribute xmlFormat

Parameters

$name
$name, nickname or id
private
# outputXML( )

prepare to XML output

prepare to XML output

public array
# loadObjByNick( string $obj_nick, boolean $blockAccess = true )

Like loadObj using nickname

Like loadObj using nickname

Parameters

$obj_nick
$blockAccess
see FrontendController::loadObj()

Returns

array
protected array
# loadAndSetObjByNick( string $obj_nick, string $var_name = null, boolean $blockAccess = true )

Like loadAndSetObj using nickname

Like loadAndSetObj using nickname

Parameters

$obj_nick
$var_name
view var name
$blockAccess
see FrontendController::loadObj()

Returns

array
protected array
# loadAndSetObj( integer $obj_id, string $var_name = null, boolean $blockAccess = true )

Load bedita Object and set view var with $var_name or object type (e.g. "Document", "Event"..) Returns object loaded Throws Exception on errors

Load bedita Object and set view var with $var_name or object type (e.g. "Document", "Event"..) Returns object loaded Throws Exception on errors

Parameters

$obj_id
$var_name
view var name
$blockAccess
see FrontendController::loadObj()

Returns

array
public array
# loadObj( integer $obj_id, boolean $blockAccess = true, array $options = array() )

Returns bedita Object Throws Exception on errors

Returns bedita Object Throws Exception on errors

Parameters

$obj_id
$blockAccess

if it's set a "frontend_access_without_block" permission on the object this param is ignored and the object returned (array) will have a key named "authorized" set to true or false depending on whether the user has permission to access at the object else if it's set a "frontend_access_with_block" permission on the object true => if user is unlogged return UNLOGGED constant if user is logged and he hasn't permission to access at the object return UNAUTHORIZED constant false => if user unlogged dosen't block the action and the object returned (array) will have a key named "authorized" set to false if user is logged but not authorized the object returned (array)

$options

a set of options for the method: - bindingLevel: the requested model binding level to use - explodeRelations: true (default) to explode the objects related. The main object model bindings set have to contain 'RelatedObject' association

note: if FrontendController::showUnauthorized is set to true and the user is logged then all unauthorized object will have set "authorized" to false regardless object permission

Returns

array
object detail
protected
# excludeRelations( array & $obj )

Remove from 'RelatedObject' array relations excluded in configuration via $config['excludeRelationsFrontend']

Remove from 'RelatedObject' array relations excluded in configuration via $config['excludeRelationsFrontend']

Parameters

$obj
$obj, object data array
protected
# loadAndSetSectionObjects( integer $parent_id, array $options = array() )

Load objects in section $parent_id and set in view vars an array for each object type (e.g. in view you will have $Document => array(0 => ..., 1 => ...) $Event" => array(0 => ..., 1 => ...) )

Load objects in section $parent_id and set in view vars an array for each object type (e.g. in view you will have $Document => array(0 => ..., 1 => ...) $Event" => array(0 => ..., 1 => ...) )

Parameters

$parent_id
$options
$options, filter and pagination options
protected
# loadAndSetSectionObjectsByNick( string $parentNick, array $options = array() )

Load objects in section $parentNick and set in view vars an array for each object type

Load objects in section $parentNick and set in view vars an array for each object type

Parameters

$parentNick
$options
$options, filter and pagination options
public array
# loadSectionObjectsByNick( string $parentNick, array $options = array() )

Load objects in section $parentNick

Load objects in section $parentNick

Parameters

$parentNick
$options
$options, filter and pagination options

Returns

array
public array
# loadSectionObjects( integer $parent_id, array $options = array() )

Load objects in section $parent_id

Load objects in section $parent_id

Parameters

$parent_id
$options
$options, filter, pagination and other options

Returns

array
protected array
# loadRelatedObjects( integer $id, string $relation, array $options )

Load paginated collection of objects related to object $id by $relation

Load paginated collection of objects related to object $id by $relation

$option can be used to customize the objects searched. Possible values are: - filter: additional filter to add to search - order: field used to sort collection (default 'priority') - dir: the sorting algorithm. true (default) for ASC, false for DESC - page: the page to show - dim: the dimension of the page - explodeRelations: explode the relations of related objects (default true for compatibility with self::loadSectionObjects()) or not

Parameters

$id
the main object id
$relation
the relation name
$options

Returns

array
protected
# setPublicationDateFilter( array & $filter )

Add to $filter the rules relative to publication date In detail: - add rule to 'start_date' - add rule to 'end_date'

Add to $filter the rules relative to publication date In detail: - add rule to 'start_date' - add rule to 'end_date'

protected integer|null
# getSectionCacheExpiration( integer $parentId )

Get the timestamp of the possible expiration date of loadSectionObjects() cache.

Get the timestamp of the possible expiration date of loadSectionObjects() cache.

Parameters

$parentId
Parent ID.

Returns

integer|null
protected integer|null
# getRelatedCacheExpiration( integer $objectId, string $relationSwitch )

Get the timestamp of the possible expiration date of loadRelatedObjects() cache.

Get the timestamp of the possible expiration date of loadRelatedObjects() cache.

Parameters

$objectId
Object ID.
$relationSwitch
Relation switch.

Returns

integer|null
public
# content( string|id $name )

find first section that contain content ($name) then call section method

find first section that contain content ($name) then call section method

Parameters

$name
$name, id or content nickname
public
# section( string/int $secName, string/int $contentName = null )

find section and contents from section nick or section id and set template vars

find section and contents from section nick or section id and set template vars

Set section and: if $contentName=null set all contents in section if $contentName is defined set single content if $contentName is defined and $this->showAllContents=true set content and other contents too (default)

Execute 'sectionNickname'BeforeFilter and/or 'sectionNickName'BeforeRender if they're set in the controller (i.e. pages_controller.php)

Parameters

$secName
$secName: section nick or section id
$contentName
$contentName: content nick or content id
public
# route( )

Route to section, content or another method following these rules: 0. if urls begin with lang/XYZ and XYZ is a valid frontend language, switches to that language and continues routing. Please note that in order for this to work, your frontend should implement an additional route: Router::connect('/lang/:lang/*', array('controller' => 'pages', 'action' => 'route'), array('lang' => '[a-z]{3}', 'persist' => 'lang')); 1. if there aren't url arguments (i.e. /) => uses homePage reserved word 2. if first url argument is a reserved words defined in configuration var 'defaultReservedWords' and 'cfgReservedWords' => try to call the method itself 3. if first url argument is a method of current controller => try to call the method itself 4. if first url argugment is a valid nickname and there is a method of current Controller with the name defined in BeLib::variableFromNickname => try to call the method itself example: www.example.com/my-nickname => calls PagesController::myNickname() method if it exists 5. if first url argument is a valid nickname => calls the appropriate FrontendController::section() or FrontendController::content() method 6. throw exception and 404 http error

Route to section, content or another method following these rules: 0. if urls begin with lang/XYZ and XYZ is a valid frontend language, switches to that language and continues routing. Please note that in order for this to work, your frontend should implement an additional route: Router::connect('/lang/:lang/*', array('controller' => 'pages', 'action' => 'route'), array('lang' => '[a-z]{3}', 'persist' => 'lang')); 1. if there aren't url arguments (i.e. /) => uses homePage reserved word 2. if first url argument is a reserved words defined in configuration var 'defaultReservedWords' and 'cfgReservedWords' => try to call the method itself 3. if first url argument is a method of current controller => try to call the method itself 4. if first url argugment is a valid nickname and there is a method of current Controller with the name defined in BeLib::variableFromNickname => try to call the method itself example: www.example.com/my-nickname => calls PagesController::myNickname() method if it exists 5. if first url argument is a valid nickname => calls the appropriate FrontendController::section() or FrontendController::content() method 6. throw exception and 404 http error

Throws

BeditaBadRequestException,
BeditaNotFoundException
public
# search( )

search inside history

search inside history

public
# subscribe( string $what = "newsletter" )

public subscribe page, used for newsletter/frontend subscribe/unsubscribe

public subscribe page, used for newsletter/frontend subscribe/unsubscribe

Parameters

$what
public
# hashjob( string $service_type = null, string $hash = null )

manage hash request like newsletter/frontend subscribe/unsubscribe

manage hash request like newsletter/frontend subscribe/unsubscribe

Parameters

$service_type
$hash

Throws

BeditaInternalErrorException,
BeditaBadRequestException
protected array
# getPath( integer $object_id )

find parent path of $object_id (excluded publication)

find parent path of $object_id (excluded publication)

Parameters

$object_id

Returns

array
(the keys are object's id)
protected array
# getParentsObject( integer $object_id )

get array of parents that contain the object specified by $object_id

get array of parents that contain the object specified by $object_id

Parameters

$object_id

Returns

array
protected array
# loadArchiveTree( string $secName, $options = array() )

build archive tree

build archive tree

Array( "Document" => Array( "2008" => Array( "01" => Array( 0 => document, 1 => document, ... "monthName" => month name "total" => number of document in january ), "02" => Array(...), .... "total" => numeber of document in 2008 ), "2007" => Array(...), "ShortNews" => .... )

Parameters

$secName
section id or section nickname
$options

Returns

array
public
# loadTags( string $tplVar = null, boolean $cloud = true, boolean $shuffle = false, integer $tagShowed = null )

load all tag

load all tag

Parameters

$tplVar
$cloud

$cloud, if true set 'class' key (possible value: smallestTag, largestTag, largeTag, mediumTag, smallTag)

$shuffle
$shuffle, if true shuffle the tags else order by label
$tagShowed
$tagShowed, define how much tags have to be returned (null = all tags)
public
# tag( string $name )

find all objects tagged by $name and set results for view

find all objects tagged by $name and set results for view

Parameters

$name
public
# category( string $name )

find all objects for category $name and set results for view

find all objects for category $name and set results for view

Parameters

$name
protected array
# loadObjectsByCategory( string $categoryName, array $options = array() )

return objects for a specific category

return objects for a specific category

Parameters

$categoryName
$category category name (friendly url/unique name)
$options

search options "section" => name or id section "filter" => particular filter "order", "dir", "dim", "page" used like pagination parameters, "baseLevel" => true to use $this->baseLevel = true for model bindings

Returns

array
private array
# loadObjectsByTagCategory( string $name, array $options = array(), string $type = "tag" )

Internal method for loadObjectsByCategory loadObjectsByTag

Internal method for loadObjectsByCategory loadObjectsByTag

Parameters

$name
category/tag name (friendly url/unique name)
$options
search options (see loadObjectsByCategory)
$type
$type, "tag" (default), or "category"

Returns

array

Throws

BeditaNotFoundException,
BeditaBadRequestException
protected array
# loadObjectsByTag( string $tag, array $options = array() )

return objects for a specific tag

return objects for a specific tag

Parameters

$tag
tag name (friendly url/unique name)
$options

search options "section" => name or id section "filter" => particular filter "order", "dir", "dim", "page" used like pagination parameters "baseLevel" => true to use $this->baseLevel = true for model bindings

Returns

array
protected array
# loadAnnotations( string $annotationType, string $objectName, array $options = array() )

load annotation referenced to some object

load annotation referenced to some object

Parameters

$annotationType
$annotationType, object type of the annotation e.g. "comment"
$objectName
$objectName, reference object nickname or id
$options
$options, specific options (pagination, filter) that override annotationOptions attribute

Returns

array
of annotations
public
# download( $name )

force download of media object

force download of media object

Parameters

$name
or object nickname

Throws

BeditaBadRequestException,
BeditaNotFoundException
public
# captchaImage( )

show image for captcha

show image for captcha

public
# saveComment( )

save comment relative to an object, set 'info' flash message throw Exception in case of error and set 'error' flash message

save comment relative to an object, set 'info' flash message throw Exception in case of error and set 'error' flash message

If it's ajax request and if not empty $this->params["form"]["render"] renders it

elseif it's not ajax request then redirect to referer

Throws

BeditaException
public
# printme( integer $id = null, string $printLayout = null )

show an object in print mode with specific layout and view CakePHP layout: print (if dosen't exists in frontend app use backend print layout) use print view if not set a specific $printLayout

show an object in print mode with specific layout and view CakePHP layout: print (if dosen't exists in frontend app use backend print layout) use print view if not set a specific $printLayout

Parameters

$id
$printLayout
$printLayout, the view template to use
protected mixed
# save( string $modelName = null )

save a BEdita object. User has to be logged

save a BEdita object. User has to be logged

Parameters

$modelName

(Document, Event, ....). If undefined get object type from $this->data["object_type_id"]

Returns

mixed
int|boolean, false on error, object_id saved on success
protected boolean
# delete( )

delete a BEdita object. User has to be logged

delete a BEdita object. User has to be logged

Returns

boolean
private
# checkParentStatus( integer $section_id )

check parents status of $section_id

check parents status of $section_id

if one or more parents haven't status IN $this->status array throw a BeditaNotFoundException

Parameters

$section_id

Throws

BeditaNotFoundException
protected
# showDraft( )

add "draft" status to class attribute $status

add "draft" status to class attribute $status

public array
# getStatus( )

return class attribute $status

return class attribute $status

Returns

array
public
# manifestAppcache( )

dynamic manifest if Configure::read("debug") === 0 (production env) the manifest is cached by CakePHP else (development env) the manifest is generated every time

dynamic manifest if Configure::read("debug") === 0 (production env) the manifest is cached by CakePHP else (development env) the manifest is generated every time

public array
# getPublication( )

Return the current frontend publication

Return the current frontend publication

Returns

array
public array
# clearObjectCacheArray( mixed $ids = null )

Clear self::objectCache array If $ids is empty all self::objectCache is cleaned

Clear self::objectCache array If $ids is empty all self::objectCache is cleaned

self::objectCache can be selectively cleared passing an id or an array of ids to delete

Parameters

$ids

Returns

array
the current self::objectCache after cleaning
public boolean
# getShowUnauthorized( )

Getter for self::showUnauthorized

Getter for self::showUnauthorized

Returns

boolean
public boolean
# setShowUnauthorized( $value )

Setter for self::showUnauthorized

Setter for self::showUnauthorized

Returns

boolean
public boolean
# getSkipCheck( )

Getter for self::skipCheck

Getter for self::skipCheck

Returns

boolean
public boolean
# setSkipCheck( $value )

Setter for self::skipCheck

Setter for self::skipCheck

Returns

boolean

Methods inherited from AppController

__construct(), afterFilter(), beditaAfterFilter(), beditaBeforeFilter(), beditaBeforeRender(), beforeCheckLogin(), beforeFilter(), beforeRender(), checkObjectWritePermission(), currentController(), deleteObjects(), eventError(), eventInfo(), eventLog(), eventWarn(), forward(), handleError(), idFromNicknameCache(), loadModelByObjectTypeId(), loadModelByType(), modelBindings(), objectRelationArray(), objectTypeCache(), objectTypeIdCache(), prepareRelationsToSave(), saveObject(), setModelBindings(), setObjectBindings(), setResult(), setupAnnotations(), setup_args(), startProfiler(), stopProfiler(), unsetModelBindings(), updateHistory(), usedUrl(), userErrorMessage(), userInfoMessage(), userWarnMessage(), viewRevision()

Constants summary

string UNLOGGED
# "unlogged"
string UNAUTHORIZED
# "unauthorized"

Constants inherited from AppController

ERROR, OK, VIEW_FWD

Properties summary

private array $status

object status used to filter

object status used to filter

# array('on')
protected array $checkPubDate

define which publication date has to be checked "start" = true to check Content.start_date <= now "end" = true to check Content.end_date >= now

define which publication date has to be checked "start" = true to check Content.start_date <= now "end" = true to check Content.end_date >= now

# array("start" => true, "end" => true)
protected boolean $baseLevel

true to load objects in base level mode (BEObject without relations and LangText model are loaded)

true to load objects in base level mode (BEObject without relations and LangText model are loaded)

# false
protected array $sectionOptions

default options used to find sections' children "showAllContents" => true to get all sections' children when a content is selected false to get only content selected "itemsByType" => true to divide children by type (i.e. Document, Event,....) false to put all content type children in 'childContents' array and section type children in 'sectionChilds' "childrenParams" => array to define special filters ('filter' array) and pagination options ("order", "dir", "dim", "page") detail level ("detailed" => true, default false used only if "showAllContents" => true)

default options used to find sections' children "showAllContents" => true to get all sections' children when a content is selected false to get only content selected "itemsByType" => true to divide children by type (i.e. Document, Event,....) false to put all content type children in 'childContents' array and section type children in 'sectionChilds' "childrenParams" => array to define special filters ('filter' array) and pagination options ("order", "dir", "dim", "page") detail level ("detailed" => true, default false used only if "showAllContents" => true)

# array("showAllContents" => true, "itemsByType" => false, "childrenParams" => array())
protected string $xmlFormat

set the XML format to display, possible values "tags", "attributes"

set the XML format to display, possible values "tags", "attributes"

# "attributes"
protected string $publication

current publication

current publication

# ""
protected array $captchaOptions

default defined in captcha component

default defined in captcha component

# array()
protected array $annotationOptions

annotation options object type => find options (filter and pagination)

annotation options object type => find options (filter and pagination)

# array("comment" => array())
protected array $objectCache

BE obj internal cache id => array(...)

BE obj internal cache id => array(...)

# array()
protected array $tagOptions

tag and category options

tag and category options

# array()
protected array $searchOptions

search options, attribute used on search

search options, attribute used on search

# array( 'order' => false, 'dir' => 1, 'dim' => 50, 'page' => 1, 'filter' => array() )
protected boolean $logged

user logged in or not

user logged in or not

# false
protected string $loginRedirect

path to redirect after login action

path to redirect after login action

# "/"
protected string $logoutRedirect

path to redirect after logout action

path to redirect after logout action

# "/"
protected boolean $showUnauthorized

if it's true show unauthorized objects for user in list setting "authorized" => false in object array else the unauthorized objects aren't in list (default)

if it's true show unauthorized objects for user in list setting "authorized" => false in object array else the unauthorized objects aren't in list (default)

main objects requested are always blocked if user is not authorized to see them

# false
protected string $defaultBindingLevel

The default binding level used loading objects Bindings level are defined in the models

The default binding level used loading objects Bindings level are defined in the models

See

BEAppModel::modelBindings
# 'frontend'

Properties inherited from AppController

$BeObjectCache, $components, $currLang, $currLocale, $current, $ext, $fullBaseUrl, $helpers, $historyItem, $modelBindings, $moduleList, $moduleName, $modulePerms, $objectData, $profiling, $result, $skipCheck, $uses, $view

BEdita API doc | 4-cactus API documentation generated by ApiGen