本文整理汇总了PHP中eZContentObjectTreeNode::availableClassListJsArray方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentObjectTreeNode::availableClassListJsArray方法的具体用法?PHP eZContentObjectTreeNode::availableClassListJsArray怎么用?PHP eZContentObjectTreeNode::availableClassListJsArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZContentObjectTreeNode
的用法示例。
在下文中一共展示了eZContentObjectTreeNode::availableClassListJsArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: availableClassesJsArray
/**
* Returns available classes as Js array.
* Checks if the node is container, if yes emptyStr will be returned.
*
* @return string
*/
function availableClassesJsArray()
{
return eZContentObjectTreeNode::availableClassListJsArray(array('node' => $this));
}
示例2: initContentStructureTree
function initContentStructureTree($rootNodeID, $fetchHidden, $classFilter = false)
{
// create initial subtree with root node and empty children.
$nodes = false;
$rootTreeNode = eZContentObjectTreeNode::fetch($rootNodeID);
if ($rootTreeNode && $rootTreeNode->canRead()) {
if (!$fetchHidden && ($rootTreeNode->attribute('is_hidden') || $rootTreeNode->attribute('is_invisible'))) {
return false;
} else {
$contentObject = $rootTreeNode->attribute('object');
$viewNodeAllowed = true;
if (is_array($classFilter) && count($classFilter) > 0) {
$contentClassIdentifier = $contentObject->attribute('class_identifier');
if (!in_array($contentClassIdentifier, $classFilter)) {
$viewNodeAllowed = false;
}
}
if ($viewNodeAllowed) {
$rootNode = array('node' => array('node_id' => $rootTreeNode->attribute('node_id'), 'path_identification_string' => $rootTreeNode->pathWithNames(), 'children_count' => $rootTreeNode->attribute('children_count'), 'sort_array' => $rootTreeNode->attribute('sort_array'), 'path_string' => $rootTreeNode->attribute('path_string'), 'depth' => $rootTreeNode->attribute('depth'), 'is_hidden' => $rootTreeNode->attribute('is_hidden'), 'is_invisible' => $rootTreeNode->attribute('is_invisible')), 'classes_js_array' => eZContentObjectTreeNode::availableClassListJsArray(array('node' => &$rootTreeNode)), 'object' => array('id' => $contentObject->attribute('id'), 'name' => $contentObject->attribute('name'), 'class_identifier' => $contentObject->attribute('class_identifier'), 'class_name' => $contentObject->attribute('class_name'), 'published' => $contentObject->attribute('published'), 'is_container' => true, 'language_js_array' => eZContentLanguage::jsArrayByMask($contentObject->attribute('language_mask'))));
$nodes = array('parent_node' => &$rootNode, 'children' => array());
}
}
}
return $nodes;
}