Class FrontendController
Controller base class for backends+frontends
- Controller
- AppController
- FrontendController
Direct known subclasses
Methods summary
protected
mixed
|
|
public
|
|
public
|
|
protected
|
#
accessDenied( string $type )
manage access denied. If you want another behavior override it in pages_controller |
protected
boolean
|
|
final protected
|
#
initAttributes( )
called before action to initialize $uses & $components array don't work... (abstract class ??) |
protected
|
#
publicationDisabled( string $status )
Render off.tpl (or draft.tpl) layout when publication is disabled (off or draft) |
protected
|
|
protected
|
|
protected
|
|
protected
boolean,
|
#
checkPubblicationDate( array $obj )
check if current date is compatible with required pubblication dates (start/end date) |
public static
|
|
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 |
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 |
protected
array
|
#
loadSectionsLevels( string $secName, boolean $loadContents = false, array $exclude_nicknames = null )
Get sections levels |
protected
|
|
private
integer
|
|
public
|
|
public
|
#
sitemapXml( )
prepare an XML containing sitemap specification view in bedita-app/views/pages/sitemap_xml.tpl |
public
array
|
|
public
|
|
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) |
public
|
|
public
|
|
public
|
|
public
string|integer
|
|
public
|
|
public
|
|
private
|
|
public
array
|
|
protected
array
|
#
loadAndSetObjByNick( string $obj_nick, string $var_name = null, boolean $blockAccess = true )
Like loadAndSetObj using nickname |
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 |
public
array
|
|
protected
|
#
excludeRelations( array & $obj )
Remove from 'RelatedObject' array relations excluded in configuration via $config['excludeRelationsFrontend'] |
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 => ...) ) |
protected
|
#
loadAndSetSectionObjectsByNick( string $parentNick, array $options = array() )
Load objects in section $parentNick and set in view vars an array for each object type |
public
array
|
#
loadSectionObjectsByNick( string $parentNick, array $options = array() )
Load objects in section $parentNick |
public
array
|
#
loadSectionObjects( integer $parent_id, array $options = array() )
Load objects in section $parent_id |
protected
array
|
#
loadRelatedObjects( integer $id, string $relation, array $options )
Load paginated collection of objects related to object $id by $relation |
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' |
protected
integer|null
|
#
getSectionCacheExpiration( integer $parentId )
Get the timestamp of the possible expiration date of |
protected
integer|null
|
#
getRelatedCacheExpiration( integer $objectId, string $relationSwitch )
Get the timestamp of the possible expiration date of |
public
|
|
public
|
|
public
|
#
route( )
Route to section, content or another method following these rules:
0. if urls begin with |
public
|
|
public
|
|
public
|
|
protected
array
|
|
protected
array
|
#
getParentsObject( integer $object_id )
get array of parents that contain the object specified by $object_id |
protected
array
|
|
public
|
|
public
|
|
public
|
|
protected
array
|
#
loadObjectsByCategory( string $categoryName, array $options = array() )
return objects for a specific category |
private
array
|
#
loadObjectsByTagCategory( string $name, array $options = array(), string $type = "tag" )
Internal method for loadObjectsByCategory loadObjectsByTag |
protected
array
|
|
protected
array
|
#
loadAnnotations( string $annotationType, string $objectName, array $options = array() )
load annotation referenced to some object |
public
|
|
public
|
|
public
|
#
saveComment( )
save comment relative to an object, set 'info' flash message throw Exception in case of error and set 'error' flash message |
public
|
|
protected
mixed
|
|
protected
boolean
|
|
private
|
|
protected
|
|
public
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 |
public
array
|
|
public
array
|
#
clearObjectCacheArray( mixed $ids = null )
Clear self::objectCache array If $ids is empty all self::objectCache is cleaned |
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
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
Properties summary
private
array
|
$status
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 |
#
array("start" => true, "end" => true)
|
protected
boolean
|
$baseLevel
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) |
#
array("showAllContents" => true, "itemsByType" => false, "childrenParams" => array())
|
protected
string
|
$xmlFormat
set the XML format to display, possible values "tags", "attributes" |
#
"attributes"
|
protected
string
|
$publication
current publication |
#
""
|
protected
array
|
$captchaOptions
default defined in captcha component |
#
array()
|
protected
array
|
$annotationOptions
annotation options object type => find options (filter and pagination) |
#
array("comment" => array())
|
protected
array
|
$objectCache
BE obj internal cache id => array(...) |
#
array()
|
protected
array
|
$tagOptions
tag and category options |
#
array()
|
protected
array
|
$searchOptions
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 |
#
false
|
protected
string
|
$loginRedirect
path to redirect after login action |
#
"/"
|
protected
string
|
$logoutRedirect
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) |
#
false
|
protected
string
|
$defaultBindingLevel
The default binding level used loading objects Bindings level are defined in the models |
#
'frontend'
|
Properties inherited from AppController
$BeObjectCache
,
$components
,
$currLang
,
$currLocale
,
$current
,
$ext
,
$fullBaseUrl
,
$helpers
,
$historyItem
,
$modelBindings
,
$moduleList
,
$moduleName
,
$modulePerms
,
$objectData
,
$profiling
,
$result
,
$skipCheck
,
$uses
,
$view