Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Backend\Block\Template\Context $context, \Magento\Catalog\Model\ResourceModel\Category\Tree $categoryTree, \Magento\Framework\Registry $registry, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Framework\Json\EncoderInterface $jsonEncoder, \Magento\Framework\DB\Helper $resourceHelper, \Magento\Backend\Model\Auth\Session $backendSession, array $data=[]) | |
getSuggestedCategoriesJson ($namePart) | |
getAddRootButtonHtml () | |
getAddSubButtonHtml () | |
getExpandButtonHtml () | |
getCollapseButtonHtml () | |
getStoreSwitcherHtml () | |
getLoadTreeUrl ($expanded=null) | |
getNodesUrl () | |
getSwitchTreeUrl () | |
getIsWasExpanded () | |
getMoveUrl () | |
getTree ($parenNodeCategory=null) | |
getTreeJson ($parenNodeCategory=null) | |
getBreadcrumbsJavascript ($path, $javascriptVarName) | |
buildNodeName ($node) | |
isClearEdit () | |
canAddRootCategory () | |
canAddSubCategory () | |
![]() | |
__construct (\Magento\Backend\Block\Template\Context $context, \Magento\Catalog\Model\ResourceModel\Category\Tree $categoryTree, \Magento\Framework\Registry $registry, \Magento\Catalog\Model\CategoryFactory $categoryFactory, array $data=[]) | |
getCategory () | |
getCategoryId () | |
getCategoryName () | |
getCategoryPath () | |
hasStoreRootCategory () | |
getStore () | |
getRoot ($parentNodeCategory=null, $recursionLevel=3) | |
getCategoryCollection () | |
getRootByIds ($ids) | |
getNode ($parentNodeCategory, $recursionLevel=2) | |
getSaveUrl (array $args=[]) | |
getEditUrl () | |
getRootIds () | |
![]() | |
__construct (\Magento\Backend\Block\Template\Context $context, array $data=[]) | |
getFormKey () | |
isOutputEnabled ($moduleName=null) | |
getAuthorization () | |
getToolbar () | |
![]() | |
__construct (Template\Context $context, array $data=[]) | |
setTemplateContext ($templateContext) | |
getTemplate () | |
setTemplate ($template) | |
getTemplateFile ($template=null) | |
getArea () | |
assign ($key, $value=null) | |
fetchView ($fileName) | |
getBaseUrl () | |
getObjectData (\Magento\Framework\DataObject $object, $key) | |
getCacheKeyInfo () | |
![]() | |
__construct (\Magento\Framework\View\Element\Context $context, array $data=[]) | |
getJsLayout () | |
getRequest () | |
getParentBlock () | |
setLayout (\Magento\Framework\View\LayoutInterface $layout) | |
getLayout () | |
setNameInLayout ($name) | |
getChildNames () | |
setAttribute ($name, $value=null) | |
setChild ($alias, $block) | |
addChild ($alias, $block, $data=[]) | |
unsetChild ($alias) | |
unsetCallChild ($alias, $callback, $result, $params) | |
unsetChildren () | |
getChildBlock ($alias) | |
getChildHtml ($alias='', $useCache=true) | |
getChildChildHtml ($alias, $childChildAlias='', $useCache=true) | |
getBlockHtml ($name) | |
insert ($element, $siblingName=0, $after=true, $alias='') | |
append ($element, $alias='') | |
getGroupChildNames ($groupName) | |
getChildData ($alias, $key='') | |
getUiId ($arg1=null, $arg2=null, $arg3=null, $arg4=null, $arg5=null) | |
getJsId ($arg1=null, $arg2=null, $arg3=null, $arg4=null, $arg5=null) | |
getUrl ($route='', $params=[]) | |
getViewFileUrl ($fileId, array $params=[]) | |
formatDate ( $date=null, $format=\IntlDateFormatter::SHORT, $showTime=false, $timezone=null) | |
formatTime ( $time=null, $format=\IntlDateFormatter::SHORT, $showDate=false) | |
getModuleName () | |
escapeHtml ($data, $allowedTags=null) | |
escapeJs ($string) | |
escapeHtmlAttr ($string, $escapeSingleQuote=true) | |
escapeCss ($string) | |
stripTags ($data, $allowableTags=null, $allowHtmlEntities=false) | |
escapeUrl ($string) | |
escapeXssInUrl ($data) | |
escapeQuote ($data, $addSlashes=false) | |
escapeJsQuote ($data, $quote='\'') | |
getNameInLayout () | |
getCacheKeyInfo () | |
getCacheKey () | |
getVar ($name, $module=null) | |
isScopePrivate () | |
![]() | |
__construct (array $data=[]) | |
addData (array $arr) | |
setData ($key, $value=null) | |
unsetData ($key=null) | |
getData ($key='', $index=null) | |
getDataByPath ($path) | |
getDataByKey ($key) | |
setDataUsingMethod ($key, $args=[]) | |
getDataUsingMethod ($key, $args=null) | |
hasData ($key='') | |
toArray (array $keys=[]) | |
convertToArray (array $keys=[]) | |
toXml (array $keys=[], $rootName='item', $addOpenTag=false, $addCdata=true) | |
convertToXml (array $arrAttributes=[], $rootName='item', $addOpenTag=false, $addCdata=true) | |
toJson (array $keys=[]) | |
convertToJson (array $keys=[]) | |
toString ($format='') | |
__call ($method, $args) | |
isEmpty () | |
serialize ($keys=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"') | |
debug ($data=null, &$objects=[]) | |
offsetSet ($offset, $value) | |
offsetExists ($offset) | |
offsetUnset ($offset) | |
offsetGet ($offset) | |
![]() | |
toHtml () | |
Protected Member Functions | |
_construct () | |
_prepareLayout () | |
_getNodeJson ($node, $level=0) | |
_isCategoryMoveable ($node) | |
_isParentSelectedCategory ($node) | |
![]() | |
_getDefaultStoreId () | |
![]() | |
_toHtml () | |
![]() | |
_construct () | |
_toHtml () | |
getRootDirectory () | |
getMediaDirectory () | |
![]() | |
_construct () | |
_prepareLayout () | |
_beforeToHtml () | |
_afterToHtml ($html) | |
_toHtml () | |
_getNotFoundUrl ($route='', $params=['_direct'=> 'core/index/notFound']) | |
getCacheTags () | |
getCacheLifetime () | |
_loadCache () | |
_saveCache ($data) | |
_getSidPlaceholder ($cacheKey=null) | |
![]() | |
_getData ($key) | |
_underscore ($name) | |
Protected Attributes | |
$_template = 'Magento_Catalog::catalog/category/tree.phtml' | |
$_backendSession | |
$_resourceHelper | |
$_jsonEncoder | |
![]() | |
$_coreRegistry = null | |
$_categoryTree | |
$_categoryFactory | |
$_withProductCount | |
![]() | |
$_authorization | |
$mathRandom | |
$_backendSession | |
$formKey | |
$nameBuilder | |
![]() | |
$_viewVars = [] | |
$_baseUrl | |
$_jsUrl | |
$_allowSymlinks | |
$_filesystem | |
$_template | |
$templateEnginePool | |
$_storeManager | |
$_appState | |
$directory | |
$templateContext | |
$pageConfig | |
$resolver | |
$validator | |
![]() | |
$_design | |
$_session | |
$_sidResolver | |
$_nameInLayout | |
$_layout | |
$jsLayout = [] | |
$_request | |
$_urlBuilder | |
$_eventManager | |
$_frontController | |
$_assetRepo | |
$_viewConfig | |
$_cacheState | |
$_logger | |
$_escaper | |
$filterManager | |
$_localeDate | |
$inlineTranslation | |
$_isScopePrivate = false | |
$_scopeConfig | |
$_cache | |
![]() | |
$_data = [] | |
Additional Inherited Members | |
![]() | |
static | extractModuleName ($className) |
![]() | |
const | XML_PATH_TEMPLATE_ALLOW_SYMLINK = 'dev/template/allow_symlink' |
![]() | |
const | CACHE_GROUP = \Magento\Framework\App\Cache\Type\Block::TYPE_IDENTIFIER |
const | CACHE_KEY_PREFIX = 'BLOCK_' |
![]() | |
static | $_underscoreCache = [] |
__construct | ( | \Magento\Backend\Block\Template\Context | $context, |
\Magento\Catalog\Model\ResourceModel\Category\Tree | $categoryTree, | ||
\Magento\Framework\Registry | $registry, | ||
\Magento\Catalog\Model\CategoryFactory | $categoryFactory, | ||
\Magento\Framework\Json\EncoderInterface | $jsonEncoder, | ||
\Magento\Framework\DB\Helper | $resourceHelper, | ||
\Magento\Backend\Model\Auth\Session | $backendSession, | ||
array | $data = [] |
||
) |
\Magento\Backend\Block\Template\Context | $context | |
\Magento\Catalog\Model\ResourceModel\Category\Tree | $categoryTree | |
\Magento\Framework\Registry | $registry | |
\Magento\Catalog\Model\CategoryFactory | $categoryFactory | |
\Magento\Framework\Json\EncoderInterface | $jsonEncoder | |
\Magento\Framework\DB\Helper | $resourceHelper | |
\Magento\Backend\Model\Auth\Session | $backendSession | |
array | $data |
Definition at line 57 of file Tree.php.
|
protected |
|
protected |
Get JSON of a tree node or an associative array
Node | array | $node | |
int | $level |
Definition at line 332 of file Tree.php.
|
protected |
|
protected |
Node | array | $node |
Definition at line 409 of file Tree.php.
|
protected |
Definition at line 85 of file Tree.php.
buildNodeName | ( | $node | ) |
Get category name
\Magento\Framework\DataObject | $node |
Definition at line 383 of file Tree.php.
canAddRootCategory | ( | ) |
Check availability of adding root category
Definition at line 436 of file Tree.php.
canAddSubCategory | ( | ) |
Check availability of adding sub category
Definition at line 452 of file Tree.php.
getAddRootButtonHtml | ( | ) |
Definition at line 187 of file Tree.php.
getAddSubButtonHtml | ( | ) |
Definition at line 195 of file Tree.php.
getBreadcrumbsJavascript | ( | $path, | |
$javascriptVarName | |||
) |
Get JSON of array of categories, that are breadcrumbs for specified category path
string | $path | |
string | $javascriptVarName |
Definition at line 302 of file Tree.php.
getCollapseButtonHtml | ( | ) |
Definition at line 211 of file Tree.php.
getExpandButtonHtml | ( | ) |
Definition at line 203 of file Tree.php.
getIsWasExpanded | ( | ) |
getLoadTreeUrl | ( | $expanded = null | ) |
bool | null | $expanded |
Definition at line 228 of file Tree.php.
getMoveUrl | ( | ) |
Definition at line 268 of file Tree.php.
getNodesUrl | ( | ) |
Definition at line 240 of file Tree.php.
getStoreSwitcherHtml | ( | ) |
Definition at line 219 of file Tree.php.
getSuggestedCategoriesJson | ( | $namePart | ) |
Retrieve list of categories with name containing $namePart and their parents
string | $namePart |
Definition at line 124 of file Tree.php.
getSwitchTreeUrl | ( | ) |
Definition at line 248 of file Tree.php.
getTree | ( | $parenNodeCategory = null | ) |
mixed | null | $parenNodeCategory |
\Magento\Framework\Data\Tree\Node | $node | |
int | $depth | |
int | $currentLevel |
Definition at line 277 of file Tree.php.
getTreeJson | ( | $parenNodeCategory = null | ) |
mixed | null | $parenNodeCategory |
Definition at line 288 of file Tree.php.
isClearEdit | ( | ) |
Check if page loaded by outside link to category edit
Definition at line 426 of file Tree.php.
|
protected |