This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation

Class Concrete5_Library_Controller

A generic object that every block or page controller extends

Direct known subclasses

Controller

Indirect known subclasses

AddressAttributeTypeController, AttributeTypeController, Concrete5_Controller_AttributeType_ImageFile, Concrete5_Controller_Dashboard_System_Environment_Debug, Concrete5_Controller_Dashboard_System_Environment_FileStorageLocations, Concrete5_Controller_Dashboard_System_Environment_Info, Concrete5_Controller_Dashboard_System_Environment_Logging, Concrete5_Controller_Dashboard_System_Environment_Proxy, Concrete5_Controller_Dashboard_System_Mail, Concrete5_Controller_Dashboard_System_Mail_Importers, Concrete5_Controller_Dashboard_System_Mail_Method, Concrete5_Controller_Dashboard_System_Mail_Method_TestSettings, Concrete5_Controller_Dashboard_System_Optimization, Concrete5_Controller_AttributeType_Number, Concrete5_Controller_Dashboard_System_Optimization_Cache, Concrete5_Controller_Dashboard_System_Optimization_ClearCache, Concrete5_Controller_Dashboard_System_Optimization_Jobs, Concrete5_Controller_Dashboard_System_Permissions, Concrete5_Controller_Dashboard_System_Permissions_Advanced, Concrete5_Controller_Dashboard_System_Permissions_Antispam, Concrete5_Controller_Dashboard_System_Permissions_Captcha, Concrete5_Controller_Dashboard_System_Permissions_Files, Concrete5_Controller_Dashboard_System_Permissions_FileTypes, Concrete5_Controller_Dashboard_System_Permissions_IpBlacklist, Concrete5_Controller_AttributeType_Rating, Concrete5_Controller_Dashboard_System_Permissions_MaintenanceMode, Concrete5_Controller_Dashboard_System_Permissions_Site, Concrete5_Controller_Dashboard_System_Permissions_Tasks, Concrete5_Controller_Dashboard_System_Permissions_Users, Concrete5_Controller_Dashboard_System_Registration, Concrete5_Controller_Dashboard_System_Registration_Postlogin, Concrete5_Controller_Dashboard_System_Registration_Profiles, Concrete5_Controller_Dashboard_System_Registration_PublicRegistration, Concrete5_Controller_Dashboard_System_Seo, Concrete5_Controller_Dashboard_System_Seo_BulkSeoTool, Concrete5_Controller_AttributeType_Select, Concrete5_Controller_Dashboard_System_Seo_Excluded, Concrete5_Controller_Dashboard_System_Seo_SearchIndex, Concrete5_Controller_Dashboard_System_Seo_Statistics, Concrete5_Controller_Dashboard_System_Seo_TrackingCodes, Concrete5_Controller_Dashboard_System_Seo_Urls, Concrete5_Controller_Dashboard_Users, Concrete5_Controller_Dashboard_Users_AddGroup, Concrete5_Controller_Dashboard_Users_Attributes, Concrete5_Controller_Dashboard_Users_Group_Sets, Concrete5_Controller_Dashboard_Users_Groups, Concrete5_Controller_AttributeType_Text, Concrete5_Controller_Dashboard_Users_Search, Concrete5_Controller_Dashboard_Workflow, Concrete5_Controller_Dashboard_Workflow_List, Concrete5_Controller_Dashboard_Workflow_Me, Concrete5_Controller_DownloadFile, Concrete5_Controller_Install, Concrete5_Controller_Login, Concrete5_Controller_Members, Concrete5_Controller_PageForbidden, Concrete5_Controller_PageNotFound, Concrete5_Controller_AttributeType_Textarea, Concrete5_Controller_PageType_BlogEntry, Concrete5_Controller_PageType_CoreStack, Concrete5_Controller_Profile, Concrete5_Controller_Profile_Friends, Concrete5_Controller_Register, Concrete5_Controller_Upgrade, Concrete5_Library_AttributeTypeController, Concrete5_Library_BlockController, ConcreteInterfaceMenuItemController, ContentBlockController, Concrete5_Controller_Block_Autonav, CoreScrapbookDisplayBlockController, CoreStackDisplayBlockController, CoreStackPageTypeController, DashboardAppStatusBlockController, DashboardBaseController, DashboardBlocksController, DashboardBlocksPermissionsController, DashboardBlocksStacksController, DashboardBlocksStacksListController, DashboardBlocksTypesController, Concrete5_Controller_Block_Content, DashboardComposerController, DashboardComposerDraftsController, DashboardComposerWriteController, DashboardController, DashboardExtendAddOnsController, DashboardExtendConnectController, DashboardExtendController, DashboardExtendInstallController, DashboardExtendThemesController, DashboardExtendUpdateController, Concrete5_Controller_Block_CoreScrapbookDisplay, DashboardFeaturedAddonBlockController, DashboardFeaturedThemeBlockController, DashboardFilesAddSetController, DashboardFilesAttributesController, DashboardFilesController, DashboardFilesSearchController, DashboardFilesSetsController, DashboardNewsController, DashboardNewsflowLatestBlockController, DashboardPageController, Concrete5_Controller_Block_CoreStackDisplay, DashboardPagesAttributesController, DashboardPagesController, DashboardPagesSingleController, DashboardPagesThemesController, DashboardPagesThemesCustomizeController, DashboardPagesThemesInspectController, DashboardPagesTypesComposerController, DashboardPagesTypesController, DashboardReportsController, DashboardReportsFormsController, AutonavBlockController, Concrete5_Controller_Block_DashboardAppStatus, DashboardReportsLogsController, DashboardReportsStatisticsController, DashboardReportsSurveysController, DashboardScrapbookController, DashboardSiteActivityBlockController, DashboardSitemapController, DashboardSitemapExploreController, DashboardSitemapFullController, DashboardSitemapSearchController, DashboardSystemAttributesController, Concrete5_Controller_Block_DashboardFeaturedAddon, DashboardSystemAttributesSetsController, DashboardSystemAttributesTypesController, DashboardSystemBackupRestoreBackupController, DashboardSystemBackupRestoreController, DashboardSystemBackupRestoreDatabaseController, DashboardSystemBackupRestoreUpdateController, DashboardSystemBasicsController, DashboardSystemBasicsEditorController, DashboardSystemBasicsIconsController, DashboardSystemBasicsInterfaceController, Concrete5_Controller_Block_DashboardFeaturedTheme, DashboardSystemBasicsMultilingualController, DashboardSystemBasicsSiteNameController, DashboardSystemBasicsTimezoneController, DashboardSystemController, DashboardSystemEnvironmentController, DashboardSystemEnvironmentDebugController, DashboardSystemEnvironmentFileStorageLocationsController, DashboardSystemEnvironmentInfoController, DashboardSystemEnvironmentLoggingController, DashboardSystemEnvironmentProxyController, Concrete5_Controller_Block_DashboardNewsflowLatest, DashboardSystemMailController, DashboardSystemMailImportersController, DashboardSystemMailMethodController, DashboardSystemMailMethodTestSettingsController, DashboardSystemOptimizationCacheController, DashboardSystemOptimizationClearCacheController, DashboardSystemOptimizationController, DashboardSystemOptimizationJobsController, DashboardSystemPermissionsAdvancedController, DashboardSystemPermissionsAntispamController, Concrete5_Controller_Block_DashboardSiteActivity, DashboardSystemPermissionsCaptchaController, DashboardSystemPermissionsController, DashboardSystemPermissionsFilesController, DashboardSystemPermissionsFileTypesController, DashboardSystemPermissionsIpBlacklistController, DashboardSystemPermissionsMaintenanceModeController, DashboardSystemPermissionsSiteController, DashboardSystemPermissionsTasksController, DashboardSystemPermissionsUsersController, DashboardSystemRegistrationController, Concrete5_Controller_Block_DateArchive, DashboardSystemRegistrationPostloginController, DashboardSystemRegistrationProfilesController, DashboardSystemRegistrationPublicRegistrationController, DashboardSystemSeoBulkSeoToolController, DashboardSystemSeoController, DashboardSystemSeoExcludedController, DashboardSystemSeoSearchIndexController, DashboardSystemSeoStatisticsController, DashboardSystemSeoTrackingCodesController, DashboardSystemSeoUrlsController, Concrete5_Controller_Block_DateNav, DashboardUsersAddGroupController, DashboardUsersAttributesController, DashboardUsersController, DashboardUsersGroupsController, DashboardUsersGroupSetsController, DashboardUsersSearchController, DashboardWorkflowController, DashboardWorkflowListController, DashboardWorkflowMeController, DateArchiveBlockController, Concrete5_Controller_Block_ExternalForm, DateNavBlockController, DateTimeAttributeTypeController, DefaultAttributeTypeController, DownloadFileController, ExternalFormBlockController, FileBlockController, FlashContentBlockController, GoogleMapBlockController, GuestbookBlockController, HtmlBlockController, Concrete5_Controller_Block_File, ImageBlockController, ImageFileAttributeTypeController, InstallController, LoginController, MembersController, NextPreviousBlockController, NumberAttributeTypeController, PageForbiddenController, PageListBlockController, PageNotFoundController, Concrete5_Controller_Block_FlashContent, ProfileController, ProfileFriendsController, RatingAttributeTypeController, RegisterController, RssDisplayerBlockController, SearchBlockController, SelectAttributeTypeController, SlideshowBlockController, SurveyBlockController, TagsBlockController, BlockController, Concrete5_Controller_Block_GoogleMap, TestFormExternalFormBlockController, TextareaAttributeTypeController, TextAttributeTypeController, UpgradeController, VideoBlockController, YoutubeBlockController, Concrete5_Controller_Block_Guestbook, Concrete5_Controller_Block_Html, Concrete5_Controller_Block_Image, Concrete5_Controller_Block_NextPrevious, Concrete5_Controller_Block_PageList, Concrete5_Controller_Block_RssDisplayer, Concrete5_Controller_Block_Search, Concrete5_Controller_Block_Slideshow, Concrete5_Controller_Block_Survey, BlogEntryPageTypeController, Concrete5_Controller_Block_Tags, Concrete5_Controller_Block_Video, Concrete5_Controller_Block_Youtube, Concrete5_Controller_Dashboard, Concrete5_Controller_Dashboard_Base, Concrete5_Controller_Dashboard_Blocks, Concrete5_Controller_Dashboard_Blocks_Permissions, Concrete5_Controller_Dashboard_Blocks_Stacks, Concrete5_Controller_Dashboard_Blocks_Stacks_List, Concrete5_Controller_Dashboard_Blocks_Types, BooleanAttributeTypeController, Concrete5_Controller_Dashboard_Composer, Concrete5_Controller_Dashboard_Composer_Drafts, Concrete5_Controller_Dashboard_Composer_Write, Concrete5_Controller_Dashboard_Extend, Concrete5_Controller_Dashboard_Extend_Addons, Concrete5_Controller_Dashboard_Extend_Connect, Concrete5_Controller_Dashboard_Extend_Install, Concrete5_Controller_Dashboard_Extend_Themes, Concrete5_Controller_Dashboard_Extend_Update, Concrete5_Controller_Dashboard_Files, Concrete5_Controller_AttributeType_Address, Concrete5_Controller_Dashboard_Files_AddSet, Concrete5_Controller_Dashboard_Files_Attributes, Concrete5_Controller_Dashboard_Files_Search, Concrete5_Controller_Dashboard_Files_Sets, Concrete5_Controller_Dashboard_News, Concrete5_Controller_Dashboard_Page, Concrete5_Controller_Dashboard_Pages, Concrete5_Controller_Dashboard_Pages_Attributes, Concrete5_Controller_Dashboard_Pages_Single, Concrete5_Controller_Dashboard_Pages_Themes, Concrete5_Controller_AttributeType_Boolean, Concrete5_Controller_Dashboard_Pages_Themes_Customize, Concrete5_Controller_Dashboard_Pages_Themes_Inspect, Concrete5_Controller_Dashboard_Pages_Types, Concrete5_Controller_Dashboard_Pages_Types_Composer, Concrete5_Controller_Dashboard_Reports, Concrete5_Controller_Dashboard_Reports_Forms, Concrete5_Controller_Dashboard_Reports_Logs, Concrete5_Controller_Dashboard_Reports_Statistics, Concrete5_Controller_Dashboard_Reports_Surveys, Concrete5_Controller_Dashboard_Scrapbook, Concrete5_Controller_AttributeType_DateTime, Concrete5_Controller_Dashboard_Sitemap, Concrete5_Controller_Dashboard_Sitemap_Explore, Concrete5_Controller_Dashboard_Sitemap_Full, Concrete5_Controller_Dashboard_Sitemap_Search, Concrete5_Controller_Dashboard_System, Concrete5_Controller_Dashboard_System_Attributes, Concrete5_Controller_Dashboard_System_Attributes_Sets, Concrete5_Controller_Dashboard_System_Attributes_Types, Concrete5_Controller_Dashboard_System_BackupRestore, Concrete5_Controller_Dashboard_System_BackupRestore_Backup, Concrete5_Controller_AttributeType_Default, Concrete5_Controller_Dashboard_System_BackupRestore_Database, Concrete5_Controller_Dashboard_System_BackupRestore_Update, Concrete5_Controller_Dashboard_System_Basics, Concrete5_Controller_Dashboard_System_Basics_Editor, Concrete5_Controller_Dashboard_System_Basics_Icons, Concrete5_Controller_Dashboard_System_Basics_Interface, Concrete5_Controller_Dashboard_System_Basics_Multilingual, Concrete5_Controller_Dashboard_System_Basics_SiteName, Concrete5_Controller_Dashboard_System_Basics_Timezone, Concrete5_Controller_Dashboard_System_Environment

Package: Core
Category: Concrete
Copyright: Copyright (c) 2003-2008 Concrete5. (http://www.concrete5.org)
License: MIT License
Author: Andrew Embler andrew@concrete5.org
Located at core/libraries/controller.php

Methods summary

public
public
# __sleep( )
public
public
# setupAndRun( )

Based on the current request, the Controller object is loaded with the parameters and task requested The requested method is then run on the active controller (if that method exists)

public
# on_start( )
public
public
# runTask( string $method, array $params )

Runs a task in the active controller if it exists.

public boolean
# isPost( )

Returns true if the current request is a POST requested

public mixed
# post( string $key = null, mixed $defaultValue = null )

If no arguments are passed, returns the post array. If a key is passed, it returns the value as it exists in the post array. If a default value is provided and the key does not exist in the POST array, the default value is returned

public mixed
# get( string $key = null, mixed $defaultValue = null )

If no arguments are passed, returns the GET array. If a key is passed, it returns the value as it exists in the GET array. Also checks the set array, because this function used to return the value of the $this->set() function If a default value is provided and the key does not exist in the GET array, the default value is returned

public mixed
# request( string $key = null, mixed $defaultValue = null )

If no arguments are passed, returns the REQUEST array. If a key is passed, it returns the value as it exists in the request array. If a default value is provided and the key does not exist in the REQUEST array, the default value is returned

public
# set( string $key, string $val )

Sets a variable to be passed through from the controller to the view

public string
# getvar( string $key )

Returns the value of a previous set()

public
# addHeaderItem( string $item )

Adds an item to the view's header. This item will then be automatically printed out in the section of the page

public
# addFooterItem( string $item )

Adds an item to the view's footer. This item will then be automatically printed out before the section of the page

public
# redirect( string $location,…, string $task,…, string $params,… )

Redirects to a given URL

public
# externalRedirect( string $url, string $http_status = false )

Redirects to a given external URL

public
# isValidExternalUrl( string $url, string $http_status,… )

Validates an external URL request to avoid possible shenanagins

public boolean
# supportsPageCache( )

Whether a particular single page controller supports full page caching

public
# render( string $view )

Renders a view with the current controller as its controller

public
# setCollectionObject( Page $c )

Sets the current controller's page object

public Page
# getCollectionObject( )

Gets the current controller's page object.

public string
# getView( )

Gets the current view for the controller (typically the page's handle)

public string
# getTask( )

Gets the task requested of the controller

public array
# getControllerParameters( )

Gets the array of parameters passed to the controller

public array
# getSets( )

Gets the array of items that have been set using set()

public array
# getHelperObjects( )

Gets an array of helper objects that have been set using the $helpers array

public
# outputHeaderItems( )

Outputs a list of items set by the addHeaderItem() function

public
# outputFooterItems( )

Outputs a list of items set by the addFooterItem() function

Properties summary

public $renderOverride
#
public $theme
# null
protected array $helperObjects
# array()
protected $c
#
protected boolean $task
# false
protected boolean $parameters
# false
protected boolean $supportsPageCache
# false
protected array $restrictedMethods

array of method names that can't be called through the url

# array()