\FrontControllerCore

2007-2015 PrestaShop

NOTICE OF LICENSE

This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@prestashop.com so we can send you a copy immediately.

DISCLAIMER

Do not edit or add to this file if you wish to upgrade PrestaShop to newer versions in the future. If you wish to customize PrestaShop for your needs please refer to http://www.prestashop.com for more information.

Summary

Methods
Properties
Constants
__construct()
checkAccess()
viewAccess()
init()
postProcess()
initContent()
displayHeader()
displayFooter()
initCursedPage()
process()
redirect()
displayContent()
display()
setMobileMedia()
setMedia()
initHeader()
initFooter()
checkLiveEditAccess()
getLiveEditFooter()
productSort()
pagination()
getCurrentCustomerGroups()
isTokenValid()
addMedia()
removeMedia()
addCSS()
removeCSS()
addJS()
removeJS()
setTemplate()
getOverrideTemplate()
getLayout()
getTemplatePath()
setMobileTemplate()
initLogoAndFavicon()
addColorsToProductList()
$errors
$iso
$orderBy
$orderWay
$p
$n
$auth
$guestAllowed
$authRedirection
$ssl
$display_column_left
$display_column_right
$initialized
$nb_items_per_page
No constants found
displayMaintenancePage()
displayRestrictedCountryPage()
sslRedirection()
canonicalRedirection()
geolocationManagement()
isInWhitelistForGeolocation()
recoverCart()
useMobileTheme()
getThemeDir()
getOverrideThemeDir()
getColorsListCacheId()
$smarty
$cookie
$link
$cart
$restrictedCountry
$maintenance
$currentCustomerGroups
N/A
No private methods found
No private properties found
N/A

Properties

$errors

$errors : 

Type

$iso

$iso : 

Type

$orderBy

$orderBy : 

Type

$orderWay

$orderWay : 

Type

$p

$p : 

Type

$n

$n : 

Type

$auth

$auth : 

Type

$guestAllowed

$guestAllowed : 

Type

$authRedirection

$authRedirection : 

Type

$ssl

$ssl : 

Type

$display_column_left

$display_column_left : 

Type

$display_column_right

$display_column_right : 

Type

$initialized

$initialized : 

Type

$nb_items_per_page

$nb_items_per_page : 

Type

$smarty

$smarty : 

Type

$cookie

$cookie : 

Type

$link

$link : 

Type

$cart

$cart : 

Type

$restrictedCountry

$restrictedCountry : 

Type

$maintenance

$maintenance : 

Type

$currentCustomerGroups

$currentCustomerGroups : 

Type

Methods

__construct()

__construct() 

checkAccess()

checkAccess() : boolean

Returns

boolean

viewAccess()

viewAccess() : boolean

Returns

boolean

init()

init() 

postProcess()

postProcess() 

initContent()

initContent() 

displayHeader()

displayHeader(  $display = true) 

Parameters

$display

displayFooter()

displayFooter(  $display = true) 

Parameters

$display

initCursedPage()

initCursedPage() 

process()

process() 

redirect()

redirect() 

displayContent()

displayContent() 

1.4 retrocompatibility

display()

display() 

setMobileMedia()

setMobileMedia() 

Specific medias for mobile device.

if autoload directory is present in the mobile theme, these files will not be loaded

setMedia()

setMedia() 

initHeader()

initHeader() 

initFooter()

initFooter() 

checkLiveEditAccess()

checkLiveEditAccess() 

getLiveEditFooter()

getLiveEditFooter() 

productSort()

productSort() 

pagination()

pagination(  $total_products = null) 

Parameters

$total_products

getCurrentCustomerGroups()

getCurrentCustomerGroups() 

isTokenValid()

isTokenValid() : boolean

Check if token is valid

Returns

boolean

addMedia()

addMedia(  $media_uri,   $css_media_type = null,   $offset = null,   $remove = false,   $check_path = true) 

Parameters

$media_uri
$css_media_type
$offset
$remove
$check_path

removeMedia()

removeMedia(  $media_uri,   $css_media_type = null,   $check_path = true) 

Parameters

$media_uri
$css_media_type
$check_path

addCSS()

addCSS(  $css_uri, string  $css_media_type = 'all', integer  $offset = null, boolean  $check_path = true) 

Add one or several CSS for front, checking if css files are overriden in theme/css/modules/ directory

Parameters

$css_uri
string $css_media_type
integer $offset
boolean $check_path

removeCSS()

removeCSS(  $css_uri,   $css_media_type = 'all',   $check_path = true) 

Parameters

$css_uri
$css_media_type
$check_path

addJS()

addJS(  $js_uri, boolean  $check_path = true) 

Add one or several JS files for front, checking if js files are overriden in theme/js/modules/ directory

Parameters

$js_uri
boolean $check_path

removeJS()

removeJS(  $js_uri,   $check_path = true) 

Parameters

$js_uri
$check_path

setTemplate()

setTemplate(  $default_template) 

This is overrided to manage is behaviour if a customer access to the site with mobile device.

Parameters

$default_template

getOverrideTemplate()

getOverrideTemplate() : boolean

Returns the template corresponding to the current page.

By default this method return false but could easily be overridden in a specific controller

Returns

boolean

getLayout()

getLayout() : boolean|string

Returns the layout corresponding to the current page by using the override system Ex: On the url: http://localhost/index.php?id_product=1&controller=product, this method will check if the layout exists in the following files (in that order), and return the first found: - /themes/default/override/layout-product-1.tpl - /themes/default/override/layout-product.tpl - /themes/default/layout.tpl

Returns

boolean|string

getTemplatePath()

getTemplatePath(  $template) 

Parameters

$template

setMobileTemplate()

setMobileTemplate(  $template) 

This checks if the template set is available for mobile themes, otherwise the front template is choosen.

Parameters

$template

initLogoAndFavicon()

initLogoAndFavicon() : array

Return an array with specific logo and favicon, if mobile device

Returns

array

addColorsToProductList()

addColorsToProductList(  $products) 

Parameters

$products

displayMaintenancePage()

displayMaintenancePage() 

displayRestrictedCountryPage()

displayRestrictedCountryPage() 

sslRedirection()

sslRedirection() 

canonicalRedirection()

canonicalRedirection(  $canonical_url = '') 

Parameters

$canonical_url

geolocationManagement()

geolocationManagement(  $default_country) 

Parameters

$default_country

isInWhitelistForGeolocation()

isInWhitelistForGeolocation() 

recoverCart()

recoverCart() 

useMobileTheme()

useMobileTheme() 

getThemeDir()

getThemeDir() 

getOverrideThemeDir()

getOverrideThemeDir() 

getColorsListCacheId()

getColorsListCacheId(  $id_product) 

Parameters

$id_product