Skip to content

Latest commit

 

History

History
1762 lines (872 loc) · 41.5 KB

class.SearchControllerCore.md

File metadata and controls

1762 lines (872 loc) · 41.5 KB

Class SearchControllerCore

Contents

Properties

Methods

Properties

$ajax_search

public mixed $ajax_search

$instant_search

public mixed $instant_search

$php_self

public mixed $php_self = 'search'

$auth

public mixed $auth = false

$authRedirection

public mixed $authRedirection = false

$cart

protected mixed $cart

$cookie

protected mixed $cookie

$currentCustomerGroups

protected mixed $currentCustomerGroups

$display_column_left

public mixed $display_column_left = true

$display_column_right

public mixed $display_column_right = true

$errors

public mixed $errors = array()

$guestAllowed

public mixed $guestAllowed = false

$initialized

public mixed $initialized = false

$iso

public mixed $iso

$link

protected mixed $link

$maintenance

protected mixed $maintenance = false

$n

public mixed $n

$nb_items_per_page

public mixed $nb_items_per_page

$orderBy

public mixed $orderBy

$orderWay

public mixed $orderWay

$p

public mixed $p

$restrictedCountry

protected mixed $restrictedCountry = false

$smarty

protected mixed $smarty

$ssl

public mixed $ssl = false

$ajax

public boolean $ajax = false

$content_only

protected string $content_only = false

$context

protected \Context $context

$controller_type

public mixed $controller_type

$css_files

public array $css_files = array()

$display_footer

protected string $display_footer

$display_header

protected boolean $display_header

$js_files

public array $js_files = array()

$json

protected mixed $json = false

$php_errors

public array $php_errors = array()

$redirect_after

protected mixed $redirect_after = null

$status

protected mixed $status = ''

$template

protected string $template

Methods

__construct

mixed FrontControllerCore::__construct()

addCSS

mixed FrontControllerCore::addCSS($css_uri, string $css_media_type, integer $offset, boolean $check_path)

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

Arguments

  • $css_uri mixed
  • $css_media_type string
  • $offset integer
  • $check_path boolean

addColorsToProductList

mixed FrontControllerCore::addColorsToProductList($products)

Arguments

  • $products mixed

addJS

mixed FrontControllerCore::addJS($js_uri, boolean $check_path)

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

Arguments

  • $js_uri mixed
  • $check_path boolean

addJquery

void ControllerCore::addJquery($version, $folder, $minifier)

Add a new javascript file in page header.

Arguments

  • $version mixed
  • $folder mixed
  • $minifier mixed

addJqueryPlugin

mixed ControllerCore::addJqueryPlugin($name, null $folder, boolean $css)

Add a new javascript file in page header.

Arguments

  • $name mixed
  • $folder null
  • $css boolean

addJqueryUI

void ControllerCore::addJqueryUI($component, $theme, $check_dependencies)

Add a new javascript file in page header.

Arguments

  • $component mixed
  • $theme mixed
  • $check_dependencies mixed

addMedia

mixed FrontControllerCore::addMedia($media_uri, $css_media_type, $offset, $remove, $check_path)

Arguments

  • $media_uri mixed
  • $css_media_type mixed
  • $offset mixed
  • $remove mixed
  • $check_path mixed

ajaxDie

mixed ControllerCore::ajaxDie($value, $controller, $method)

Arguments

  • $value mixed
  • $controller mixed
  • $method mixed

canonicalRedirection

mixed FrontControllerCore::canonicalRedirection($canonical_url)

Arguments

  • $canonical_url mixed

checkAccess

boolean FrontControllerCore::checkAccess()

checkLiveEditAccess

mixed FrontControllerCore::checkLiveEditAccess()

display

mixed FrontControllerCore::display()

displayContent

mixed FrontControllerCore::displayContent()

1.4 retrocompatibility

displayFooter

mixed SearchControllerCore::displayFooter($display)

Arguments

  • $display mixed

displayHeader

mixed SearchControllerCore::displayHeader($display)

Arguments

  • $display mixed

displayMaintenancePage

mixed FrontControllerCore::displayMaintenancePage()

displayRestrictedCountryPage

mixed FrontControllerCore::displayRestrictedCountryPage()

geolocationManagement

mixed FrontControllerCore::geolocationManagement($default_country)

Arguments

  • $default_country mixed

getColorsListCacheId

mixed FrontControllerCore::getColorsListCacheId($id_product)

Arguments

  • $id_product mixed

getController

mixed ControllerCore::getController(string $class_name, boolean $auth, boolean $ssl)

Get an instance of a controller

Arguments

  • $class_name string
  • $auth boolean
  • $ssl boolean

getCurrentCustomerGroups

mixed FrontControllerCore::getCurrentCustomerGroups()

getLayout

boolean|string FrontControllerCore::getLayout()

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

getLiveEditFooter

mixed FrontControllerCore::getLiveEditFooter()

getOverrideTemplate

boolean FrontControllerCore::getOverrideTemplate()

Returns the template corresponding to the current page.

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

getOverrideThemeDir

mixed FrontControllerCore::getOverrideThemeDir()

getTemplatePath

mixed FrontControllerCore::getTemplatePath($template)

Arguments

  • $template mixed

getThemeDir

mixed FrontControllerCore::getThemeDir()

init

mixed SearchControllerCore::init()

Initialize search controller

initContent

mixed SearchControllerCore::initContent()

Assign template vars related to page content

initCursedPage

mixed FrontControllerCore::initCursedPage()

initFooter

mixed FrontControllerCore::initFooter()

initHeader

mixed FrontControllerCore::initHeader()

initLogoAndFavicon

array FrontControllerCore::initLogoAndFavicon()

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

isCached

mixed ControllerCore::isCached($template, $cacheId, $compileId)

Arguments

  • $template mixed
  • $cacheId mixed
  • $compileId mixed

isInWhitelistForGeolocation

mixed FrontControllerCore::isInWhitelistForGeolocation()

isTokenValid

boolean FrontControllerCore::isTokenValid()

Check if token is valid

isXmlHttpRequest

boolean ControllerCore::isXmlHttpRequest()

myErrorHandler

mixed ControllerCore::myErrorHandler($errno, $errstr, $errfile, $errline)

Arguments

  • $errno mixed
  • $errstr mixed
  • $errfile mixed
  • $errline mixed

pagination

mixed FrontControllerCore::pagination($total_products)

Arguments

  • $total_products mixed

postProcess

mixed FrontControllerCore::postProcess()

process

mixed FrontControllerCore::process()

productSort

mixed FrontControllerCore::productSort()

recoverCart

mixed FrontControllerCore::recoverCart()

redirect

mixed FrontControllerCore::redirect()

removeCSS

mixed FrontControllerCore::removeCSS($css_uri, $css_media_type, $check_path)

Arguments

  • $css_uri mixed
  • $css_media_type mixed
  • $check_path mixed

removeJS

mixed FrontControllerCore::removeJS($js_uri, $check_path)

Arguments

  • $js_uri mixed
  • $check_path mixed

removeMedia

mixed FrontControllerCore::removeMedia($media_uri, $css_media_type, $check_path)

Arguments

  • $media_uri mixed
  • $css_media_type mixed
  • $check_path mixed

run

mixed ControllerCore::run()

Start controller process (this method shouldn't be overriden !)

setMedia

mixed SearchControllerCore::setMedia()

setMobileMedia

mixed FrontControllerCore::setMobileMedia()

Specific medias for mobile device.

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

setMobileTemplate

mixed FrontControllerCore::setMobileTemplate($template)

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

Arguments

  • $template mixed

setTemplate

mixed FrontControllerCore::setTemplate($default_template)

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

Arguments

  • $default_template mixed

smartyOutputContent

mixed ControllerCore::smartyOutputContent($content)

Arguments

  • $content mixed

sslRedirection

mixed FrontControllerCore::sslRedirection()

useMobileTheme

mixed FrontControllerCore::useMobileTheme()

viewAccess

boolean FrontControllerCore::viewAccess()