本文整理汇总了PHP中Templates::resolveContentareaEntrymaskMapping方法的典型用法代码示例。如果您正苦于以下问题:PHP Templates::resolveContentareaEntrymaskMapping方法的具体用法?PHP Templates::resolveContentareaEntrymaskMapping怎么用?PHP Templates::resolveContentareaEntrymaskMapping使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Templates
的用法示例。
在下文中一共展示了Templates::resolveContentareaEntrymaskMapping方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: if
if ($js_array == ' ]') {
$js_array = '[]';
}
$koala->queueScript("if ( document.getElementById('clone%%cblock__') ) { document.getElementById('clone%%cblock__').parentNode.removeChild(document.getElementById('clone%%cblock__')); };");
$koala->queueScript("Koala.windows['wid_" . $parentwindow . "'].getContentareaDataFuncs( " . $js_array . ", true, (function() { if (\$('wid_" . $parentwindow . "_cblock___cbcontentinner_dummy').getStyle('display')=='block') { \$('wid_" . $parentwindow . "_cblock_" . $target_contentarea . "_" . $new_lnkid . "_cbheader').onclick(); }; }) );");
$jsQueue = new JSQueue(NULL, $siteID);
$jsQueue->add($pageID, HISTORYTYPE_PAGE, 'HIGHLIGHT_PAGE', sGuiUS(), 'name');
} else {
$koala->queueScript("Koala.updateDOM(\$('wid_" . $parentwindow . "_cblock_" . $source_contentarea . "_" . $moved_colnk . "'));");
$koala->queueScript("if (\$('wid_" . $parentwindow . "_cblock_" . $source_contentarea . "_" . $moved_colnk . "')) { var _x = \$('wid_" . $parentwindow . "_cblock_" . $source_contentarea . "_" . $moved_colnk . "'); _x.setAttribute('id','wid_" . $parentwindow . "_cblock_" . $target_contentarea . "_" . $new_lnkid . "'); _x.id = 'wid_" . $parentwindow . "_cblock_" . $target_contentarea . "_" . $new_lnkid . "'; delete _x; }");
$koala->queueScript("if (\$('wid_" . $parentwindow . "_cblock_" . $target_contentarea . "_" . $new_lnkid . "')) {\n\t\t\t\t\t\t\t\$('wid_" . $parentwindow . "_cblock_" . $target_contentarea . "_" . $new_lnkid . "').innerHTML = \$('wid_" . $parentwindow . "_cblock_" . $target_contentarea . "_" . $new_lnkid . "').innerHTML.replace(/cblock_" . $source_contentarea . "_" . $moved_colnk . "/g, 'cblock_" . $target_contentarea . "_" . $new_lnkid . "');\n\t\t\t\t\t\t\t\$('wid_" . $parentwindow . "_cblock_" . $target_contentarea . "_" . $new_lnkid . "').innerHTML = \$('wid_" . $parentwindow . "_cblock_" . $target_contentarea . "_" . $new_lnkid . "').innerHTML.replace(/" . $moved_colnk . "-cblock/g, '" . $new_lnkid . "-cblock');\n\t\t\t\t\t};");
$koala->queueScript("Koala.yg_recreateSortables( \$('wid_" . $parentwindow . "_cblock_" . $target_contentarea . "_" . $new_lnkid . "').up().id );");
$koala->queueScript("Koala.yg_fixCurrentFocusObjects();");
$koala->queueScript("Koala.yg_customAttributeHandler( \$('wid_" . $parentwindow . "_cblock_" . $target_contentarea . "_" . $new_lnkid . "') );");
// Check if contentblock/entrymask is allowed in this contentarea
$contentareasEntryMasks = $templateMgr->resolveContentareaEntrymaskMapping($pageInfo['TEMPLATEID']);
$co_controls = $movedcb->getEntrymasks();
$childNotAllowed = false;
for ($c = 0; $c < count($co_controls); $c++) {
$isAllowed = false;
foreach ($contentareasEntryMasks as $contentareasEntryMask_item) {
if ($contentareasEntryMask_item['CODE'] == $target_contentarea_code) {
foreach ($contentareasEntryMask_item['ENTRYMASKS'] as $entrymask_title_item) {
if ($co_controls[$c]['CODE'] == $entrymask_title_item) {
$isAllowed = true;
}
}
}
}
if (!$isAllowed) {
$childNotAllowed = true;