本文整理汇总了PHP中eZContentLanguage::jsArrayByMask方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentLanguage::jsArrayByMask方法的具体用法?PHP eZContentLanguage::jsArrayByMask怎么用?PHP eZContentLanguage::jsArrayByMask使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZContentLanguage
的用法示例。
在下文中一共展示了eZContentLanguage::jsArrayByMask方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: availableLanguagesJsArray
/**
* Returns the languages the object has been translated into/exists in as a JSON string
*
* @return bool|string
*/
function availableLanguagesJsArray()
{
return eZContentLanguage::jsArrayByMask( $this->LanguageMask );
}
示例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;
}