本文整理匯總了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;