OXID eShop CE  6.1.5
OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree Class Reference
+ Inheritance diagram for OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree:
+ Collaboration diagram for OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree:

Public Member Functions

 getTabs ($id, $act, $setActive=true)
 
 getActiveTab ($id, $act)
 
 getBtn ($class)
 
 getDomXml ()
 
 getListNodes ($nodes)
 
 markNodeActive ($nodeId)
 
 getListUrl ($id)
 
 getEditUrl ($id, $actTab)
 
 getClassId ($className)
 

Protected Member Functions

 _cleanEmptyParents ($dom, $parentXPath, $childXPath)
 
 _addLinks ($dom)
 
 _loadFromFile ($menuFile, $dom)
 
 _addDynLinks ($dom)
 
 _sessionizeLocalUrls ($dom)
 
 _checkRights ($dom)
 
 _checkGroups ($dom)
 
 _checkDemoShopDenials ($dom)
 
 removeInvisibleMenuNodes ($dom)
 
 _copyAttributes ($domElemTo, $domElemFrom)
 
 _mergeNodes ($domElemTo, $domElemFrom, $xPathTo, $domDocTo, $queryStart)
 
 _merge ($domNew, $dom)
 
 _getMenuFiles ()
 
 _checkDynFile ($dynFilePath)
 
 _processCachedFile ($cacheContents)
 
 _getInitialDom ()
 
 _getAdminUrl ()
 
 _hasRights ($rights)
 
 _hasGroup ($groupId)
 
 _getDynMenuUrl ($lang, $loadDynContents)
 
 _getDynMenuLang ()
 
 onGettingDomXml ()
 

Protected Attributes

 $_oDom = null
 
 $_oInitialDom = null
 
 $_sDynIncludeUrl = null
 
 $_aSupportedExpathXmlEncodings = ['utf-8', 'utf-16', 'iso-8859-1', 'us-ascii']
 

Detailed Description

Navigation tree control class

Member Function Documentation

◆ _addDynLinks()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_addDynLinks (   $dom)
protected

Adds to element DynTabs

Deprecated:
since v5.3 (2016-05-20); Dynpages will be removed.
Parameters
object$domdom element to add links

◆ _addLinks()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_addLinks (   $dom)
protected

Adds links to xml nodes to resolve paths

Parameters
DomDocument$domwhere to add links

◆ _checkDemoShopDenials()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_checkDemoShopDenials (   $dom)
protected

Removes form tree elements if this is demo shop and elements have disableForDemoShop="1"

Parameters
DOMDocument$domdocument to check group
Returns
null

◆ _checkDynFile()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_checkDynFile (   $dynFilePath)
protected

Checks if dyn file is valid for inclusion

Deprecated:
since v5.3 (2016-05-20); Dynpages will be removed.
Parameters
string$dynFilePathdyn file path
Returns
bool

◆ _checkGroups()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_checkGroups (   $dom)
protected

Removes from tree elements which don't have required groups

Parameters
DOMDocument$domdocument to check group

◆ _checkRights()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_checkRights (   $dom)
protected

Removes form tree elements which does not have required user rights

Parameters
object$domDOMDocument

◆ _cleanEmptyParents()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_cleanEmptyParents (   $dom,
  $parentXPath,
  $childXPath 
)
protected

clean empty nodes from tree

Parameters
object$domdom object
string$parentXPathparent xpath
string$childXPathchild xpath from parent

◆ _copyAttributes()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_copyAttributes (   $domElemTo,
  $domElemFrom 
)
protected

Copys attributes form one element to another

Parameters
object$domElemToDOMElement
object$domElemFromDOMElement

◆ _getAdminUrl()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_getAdminUrl ( )
protected

Admin url getter

Returns
string

◆ _getDynMenuLang()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_getDynMenuLang ( )
protected

Get dynamic pages language code

Deprecated:
since v5.3 (2016-05-20); Dynpages will be removed.
Returns
string

◆ _getDynMenuUrl()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_getDynMenuUrl (   $lang,
  $loadDynContents 
)
protected

Get dynamic pages url or local path

Deprecated:
since v5.3 (2016-05-20); Dynpages will be removed.
Parameters
int$langlanguage id
string$loadDynContentsget local or remote content path
Returns
string

◆ _getInitialDom()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_getInitialDom ( )
protected

get initial dom, not modified by init method

Returns
DOMDocument

◆ _getMenuFiles()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_getMenuFiles ( )
protected

Returns array witn pathes + names ox manu xml files. Paths are checked

Returns
array

◆ _hasGroup()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_hasGroup (   $groupId)
protected

Checks if user in required group

Parameters
string$groupIdactive group id
Returns
bool

◆ _hasRights()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_hasRights (   $rights)
protected

Checks if user has required rights

Parameters
string$rightssession user rights
Returns
bool

◆ _loadFromFile()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_loadFromFile (   $menuFile,
  $dom 
)
protected

Loads data form XML file, and merges it with main oDomXML.

Parameters
string$menuFilewhich file to load
DomDocument$domwhere to load

◆ _merge()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_merge (   $domNew,
  $dom 
)
protected

If oDomXML exist meges nodes

Parameters
DomDocument$domNewwhat to merge
DomDocument$domwhere to merge

◆ _mergeNodes()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_mergeNodes (   $domElemTo,
  $domElemFrom,
  $xPathTo,
  $domDocTo,
  $queryStart 
)
protected

Merges nodes of newly added menu xml file

Parameters
object$domElemTomerge target
object$domElemFrommerge source
object$xPathTonode path
object$domDocTonode to append child
string$queryStartnode query

◆ _processCachedFile()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_processCachedFile (   $cacheContents)
protected

Method is used for overriding.

Parameters
string$cacheContents
Returns
string

◆ _sessionizeLocalUrls()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::_sessionizeLocalUrls (   $dom)
protected

add session parameters to local urls

Parameters
object$domdom element to add links

◆ getActiveTab()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::getActiveTab (   $id,
  $act 
)

Returns active TAB class name

Parameters
string$idclass name
int$actactive tab number
Returns
string

◆ getBtn()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::getBtn (   $class)

returns from oDomXML tree buttons stdClass, which belongs to $class

Parameters
string$classclass name
Returns
mixed

◆ getClassId()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::getClassId (   $className)

Returns id of class assigned to current node

Parameters
string$classNameactive class name
Returns
string

◆ getDomXml()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::getDomXml ( )

Returns DomXML

Returns
DOMDocument

◆ getEditUrl()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::getEditUrl (   $id,
  $actTab 
)

Formats and returns url for edit area

Parameters
string$idtab related class
int$actTabactive tab
Returns
string

◆ getListNodes()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::getListNodes (   $nodes)

Returns DOMNodeList of given navigation classes

Parameters
array$nodesNode array
Returns
DOMNodeList

◆ getListUrl()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::getListUrl (   $id)

Formats and returns url for list area

Parameters
string$idtab related class
Returns
string

◆ getTabs()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::getTabs (   $id,
  $act,
  $setActive = true 
)

Returns from oDomXML tree tabs DOMNodeList, which belongs to $id

Parameters
string$idclass name
int$actcurrent tab number
bool$setActivemarks tab as active
Returns
DOMNodeList

◆ markNodeActive()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::markNodeActive (   $nodeId)

Marks passed node as active

Parameters
string$nodeIdnode id

◆ onGettingDomXml()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::onGettingDomXml ( )
protected

Method is used for overriding.

◆ removeInvisibleMenuNodes()

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::removeInvisibleMenuNodes (   $dom)
protected

Removes node from tree elements if it is marked as not visible (visible="0")

Parameters
DOMDocument$domdocument to check group

Member Data Documentation

◆ $_aSupportedExpathXmlEncodings

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::$_aSupportedExpathXmlEncodings = ['utf-8', 'utf-16', 'iso-8859-1', 'us-ascii']
protected

◆ $_oDom

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::$_oDom = null
protected

stores DOM object for all navigation tree

◆ $_oInitialDom

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::$_oInitialDom = null
protected

keeps unmodified dom

◆ $_sDynIncludeUrl

OxidEsales\EshopCommunity\Application\Controller\Admin\NavigationTree::$_sDynIncludeUrl = null
protected

The documentation for this class was generated from the following file: