Constants

MAX_NAME_LENGTH

MAX_NAME_LENGTH

Properties

$check_features_version

$check_features_version : 

This value is used in isThemeCompatible method. only version node with an higher version number will be used in [theme]/config.xml

Type

$check_features

$check_features : 

$check_features is a multidimensional array used to check [theme]/config.xml values, and also checks prestashop current configuration if not match.

Type

$className

$className : 

Type

$table

$table : 

Type

$toolbar_scroll

$toolbar_scroll : 

Type

$img_error

$img_error : 

Type

Methods

__construct()

__construct() 

init()

init() 

renderForm()

renderForm() 

renderList()

renderList() 

downloadAddonsThemes()

downloadAddonsThemes() 

processAdd()

processAdd() 

processUpdate()

processUpdate() 

processDelete()

processDelete() 

initPageHeaderToolbar()

initPageHeaderToolbar() 

processExportTheme()

processExportTheme() 

renderExportTheme()

renderExportTheme() 

processImportTheme()

processImportTheme() 

renderImportTheme()

renderImportTheme() 

initContent()

initContent() 

ajaxProcessGetAddonsThemes()

ajaxProcessGetAddonsThemes() 

renderChooseThemeModule()

renderChooseThemeModule() 

processThemeInstall()

processThemeInstall() 

renderView()

renderView() 

postProcess()

postProcess() 

This functions make checks about AdminThemes configuration edition only.

updateOptionPsLogo()

updateOptionPsLogo() 

Update PS_LOGO

updateOptionPsLogoMobile()

updateOptionPsLogoMobile() 

Update PS_LOGO_MOBILE

updateOptionPsLogoMail()

updateOptionPsLogoMail() 

Update PS_LOGO_MAIL

updateOptionPsLogoInvoice()

updateOptionPsLogoInvoice() 

Update PS_LOGO_INVOICE

updateOptionPsStoresIcon()

updateOptionPsStoresIcon() 

Update PS_STORES_ICON

updateOptionPsFavicon()

updateOptionPsFavicon() 

Update PS_FAVICON

updateOptionThemeForShop()

updateOptionThemeForShop() 

Update theme for current shop

initProcess()

initProcess() 

printResponsiveIcon()

printResponsiveIcon(  $value) 

Parameters

$value

processResponsive()

processResponsive() 

processDefaultLeftColumn()

processDefaultLeftColumn() 

processDefaultRightColumn()

processDefaultRightColumn() 

ajaxProcessLeftMeta()

ajaxProcessLeftMeta() 

processLeftMeta()

processLeftMeta() 

ajaxProcessRightMeta()

ajaxProcessRightMeta() 

processRightMeta()

processRightMeta() 

renderOptions()

renderOptions() 

Function used to render the options for this controller

setMedia()

setMedia() 

copyTheme()

copyTheme(string  $base_theme_dir, string  $target_theme_dir) : boolean

copy $base_theme_dir into $target_theme_dir.

Parameters

string $base_theme_dir

relative path to base dir

string $target_theme_dir

relative path to target dir

Returns

boolean —

true if success

processUpdateOptions()

processUpdateOptions() 

extractTheme()

extractTheme(  $theme_zip_file,   $sandbox) 

Parameters

$theme_zip_file
$sandbox

installTheme()

installTheme(  $theme_dir,   $sandbox = false,   $redirect = true) 

Parameters

$theme_dir
$sandbox
$redirect

isThemeInstalled()

isThemeInstalled(  $theme_name) 

Parameters

$theme_name

importThemeXmlConfig()

importThemeXmlConfig(\SimpleXMLElement  $xml, boolean  $theme_dir = false) : array|string

Parameters

\SimpleXMLElement $xml
boolean $theme_dir

only used if the theme directory to import is already located on the shop

Returns

array|string —

return array of themes on success, otherwise the error as a string is returned

_isThemeCompatible()

_isThemeCompatible(string  $theme_dir) : boolean

This function checks if the theme designer has thunk to make his theme compatible 1.4, and noticed it on the $theme_dir/config.xml file. If not, some new functionnalities has to be desactivated

Parameters

string $theme_dir

theme directory

Returns

boolean —

Validity is ok or not

_checkConfigForFeatures()

_checkConfigForFeatures(  $arrFeatures, mixed  $configItem = array()) : \error

_checkConfigForFeatures

Parameters

$arrFeatures
mixed $configItem

will precise the attribute which not matches. If empty, will check every attributes

Returns

\error —

message, or null if disabled

updateLogo()

updateLogo(  $field_name,   $logo_prefix) : boolean

Generic function which allows logo upload

Parameters

$field_name
$logo_prefix

Returns

boolean

uploadIco()

uploadIco(  $name,   $dest) 

Parameters

$name
$dest

checkParentClass()

checkParentClass(  $name) 

Parameters

$name

checkNames()

checkNames() 

checkDocumentation()

checkDocumentation() 

checkVersionsAndCompatibility()

checkVersionsAndCompatibility() 

checkPostedDatas()

checkPostedDatas() 

archiveThisFile()

archiveThisFile(  $obj,   $file,   $server_path,   $archive_path) 

Parameters

$obj
$file
$server_path
$archive_path

generateArchive()

generateArchive() 

generateXML()

generateXML(  $theme_to_export,   $metas) 

Parameters

$theme_to_export
$metas

renderExportTheme1()

renderExportTheme1() 

checkXmlFields()

checkXmlFields(  $xml_file) 

Parameters

$xml_file

recurseCopy()

recurseCopy(  $src,   $dst) 

Parameters

$src
$dst

getNativeModule()

getNativeModule(integer  $type) : array

Parameters

integer $type

$type = 0 both native & partner (default) $type = 1 native $type = 2 partner

Returns

array

getModules()

getModules(  $xml) 

Parameters

$xml

formatHelperArray()

formatHelperArray(  $origin_arr) 

Parameters

$origin_arr

formatHelperValuesArray()

formatHelperValuesArray(  $originArr) 

Parameters

$originArr

updateImages()

updateImages(  $xml) 

Parameters

$xml

hookModule()

hookModule(  $id_module,   $module_hooks,   $shop) 

Parameters

$id_module
$module_hooks
$shop