Constants

TAB_MODULE_LIST_URL

TAB_MODULE_LIST_URL

Properties

$name

$name : string

Type

string — Displayed name

$class_name

$class_name : string

Type

string — Class and file name

$module

$module : 

Type

$id_parent

$id_parent : integer

Type

integer — parent ID

$position

$position : integer

Type

integer — position

$active

$active : boolean

Type

boolean — active

$hide_host_mode

$hide_host_mode : integer

Type

integer — hide_host_mode

$definition

$definition : 

Type

$_getIdFromClassName

$_getIdFromClassName : 

Type

$_cache_tabs

$_cache_tabs : 

Get tabs

Type

Methods

add()

add(boolean  $autodate = true, boolean  $null_values = false) : integer

additionnal treatments for Tab when creating new one : - generate a new position - add access for admin profile

Parameters

boolean $autodate
boolean $null_values

Returns

integer —

id_tab

save()

save(  $null_values = false,   $autodate = true) 

Parameters

$null_values
$autodate

initAccess()

initAccess(integer  $id_tab, \Context  $context = null) : boolean

When creating a new tab $id_tab, this add default rights to the table access

Parameters

integer $id_tab
\Context $context

Returns

boolean —

true if succeed

delete()

delete() 

getCurrentTabId()

getCurrentTabId() : integer

Get tab id

Returns

integer —

tab id

getCurrentParentId()

getCurrentParentId() : integer

Get tab parent id

Returns

integer —

tab parent id

getTab()

getTab(  $id_lang,   $id_tab) : array

Get tab

Parameters

$id_lang
$id_tab

Returns

array —

tab

getModuleTabList()

getModuleTabList() : array

Return the list of tab used by a module

Returns

array

getTabs()

getTabs(  $id_lang,   $id_parent = null) 

Parameters

$id_lang
$id_parent

getIdFromClassName()

getIdFromClassName(  $class_name) : integer

Get tab id from name

Parameters

$class_name

Returns

integer —

id_tab

getCollectionFromModule()

getCollectionFromModule(  $module, null  $id_lang = null) : array|\PrestaShopCollection

Get collection from module name

Parameters

$module

string Module name

null $id_lang

integer Language ID

Returns

array|\PrestaShopCollection —

Collection of tabs (or empty array)

enablingForModule()

enablingForModule(  $module) : boolean

Enabling tabs for module

Parameters

$module

string Module Name

Returns

boolean —

Status

disablingForModule()

disablingForModule(  $module) : boolean

Disabling tabs for module

Parameters

$module

string Module name

Returns

boolean —

Status

getInstanceFromClassName()

getInstanceFromClassName(  $class_name,   $id_lang = null) : \Tab

Get Instance from tab class name

Parameters

$class_name

string Name of tab class

$id_lang

integer id_lang

Returns

\Tab —

Tab object (empty if bad id or class name)

getNbTabs()

getNbTabs(  $id_parent = null) 

Parameters

$id_parent

getNewLastPosition()

getNewLastPosition(mixed  $id_parent) : integer

return an available position in subtab for parent $id_parent

Parameters

mixed $id_parent

Returns

integer

move()

move(  $direction) 

Parameters

$direction

cleanPositions()

cleanPositions(  $id_parent) 

Parameters

$id_parent

updatePosition()

updatePosition(  $way,   $position) 

Parameters

$way
$position

checkTabRights()

checkTabRights(  $id_tab) 

Parameters

$id_tab

recursiveTab()

recursiveTab(  $id_tab,   $tabs) 

Parameters

$id_tab
$tabs

update()

update(boolean  $null_values = false) : boolean

Overrides update to set position to last when changing parent tab

Parameters

boolean $null_values

Returns

boolean

getTabByIdProfile()

getTabByIdProfile(  $id_parent,   $id_profile) 

Parameters

$id_parent
$id_profile

getClassNameById()

getClassNameById(  $id_tab) 

Parameters

$id_tab

getTabModulesList()

getTabModulesList(  $id_tab) 

Parameters

$id_tab