當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ModulesHelper::getAssignmentOptions方法代碼示例

本文整理匯總了PHP中ModulesHelper::getAssignmentOptions方法的典型用法代碼示例。如果您正苦於以下問題:PHP ModulesHelper::getAssignmentOptions方法的具體用法?PHP ModulesHelper::getAssignmentOptions怎麽用?PHP ModulesHelper::getAssignmentOptions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ModulesHelper的用法示例。


在下文中一共展示了ModulesHelper::getAssignmentOptions方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

			}
		</script>

		<fieldset class="adminform">
			<legend><?php 
echo JText::_('COM_MODULES_MENU_ASSIGNMENT');
?>
</legend>
			<label id="jform_menus-lbl" for="jform_menus"><?php 
echo JText::_('COM_MODULES_MODULE_ASSIGN');
?>
</label>

			<fieldset id="jform_menus" class="radio">
				<?php 
$options = ModulesHelper::getAssignmentOptions($that->item->client_id);
$displayValue = $displayText = $list = "";
foreach ($options as $option) {
    $text = JText::_($option->text);
    if ((string) $that->item->assignment == (string) $option->value) {
        $displayValue = $option->value;
        $displayText = $text;
    }
    $list .= '<li data-value="' . $option->value . '" data-text="' . $text . '" data-icon="" data-dynamic="">' . "\n";
    $list .= '	<a href="#"><span>' . $text . '</span></a>' . "\n";
    $list .= '</li>' . "\n";
}
?>
				<div class="sprocket-dropdown">
					<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
						<span><?php 
開發者ID:densem-2013,項目名稱:exikom,代碼行數:31,代碼來源:edit_assignment_25.php

示例2:

		</script>

		<fieldset class="adminform">
			<legend><?php 
echo JText::_('COM_MODULES_MENU_ASSIGNMENT');
?>
</legend>
			<label id="jform_menus-lbl" for="jform_menus"><?php 
echo JText::_('COM_MODULES_MODULE_ASSIGN');
?>
</label>

			<fieldset id="jform_menus" class="radio">
				<select name="jform[assignment]" id="jform_assignment">
					<?php 
echo JHtml::_('select.options', ModulesHelper::getAssignmentOptions($this->item->client_id), 'value', 'text', $this->item->assignment, true);
?>
				</select>

			</fieldset>

			<label id="jform_menuselect-lbl" for="jform_menuselect"><?php 
echo JText::_('JGLOBAL_MENU_SELECTION');
?>
</label>

			<button type="button" class="jform-assignments-button jform-rightbtn" onclick="$$('.chkbox').each(function(el) { el.checked = !el.checked; });">
				<?php 
echo JText::_('JGLOBAL_SELECTION_INVERT');
?>
			</button>
開發者ID:joomline,項目名稱:Joomla2.5.999,代碼行數:31,代碼來源:edit_assignment.php

示例3: render

    function render($type)
    {
        $sliders =& JPane::getInstance('sliders');
        echo $sliders->startPane('params');
        TranslateParams_xml::renderDoublecolumnParams($this->form, 'params', 'com_modules', $sliders);
        echo $sliders->endPane();
        // menu assignments
        // Initiasile related data.
        if (!class_exists('MenusHelper')) {
            JLoader::register('MenusHelper', JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php', true);
        }
        if (!class_exists('ModulesHelper')) {
            JLoader::register('ModulesHelper', JPATH_ADMINISTRATOR . '/components/com_modules/helpers/modules.php', true);
        }
        $menuTypes = MenusHelper::getMenuLinks();
        ?>
		<script type="text/javascript">
			window.addEvent('domready', function(){
				validate();
				document.getElements('select').addEvent('change', function(e){validate();});
			});
			function validate(){
				var value	= document.id('jform_assignment').value;
				var list	= document.id('menu-assignment');
				if(value == '-' || value == '0'){
					$$('.jform-assignments-button').each(function(el) {el.setProperty('disabled', true); });
					list.getElements('input').each(function(el){
						el.setProperty('disabled', true);
						if (value == '-'){
							el.setProperty('checked', false);
						} else {
							el.setProperty('checked', true);
						}
					});
				} else {
					$$('.jform-assignments-button').each(function(el) {el.setProperty('disabled', false); });
					list.getElements('input').each(function(el){
						el.setProperty('disabled', false);
					});
				}
			}
		</script>
		<div class="width-100 fltlft">
		<fieldset class="adminform">
			<legend><?php 
        echo JText::_('COM_MODULES_MENU_ASSIGNMENT');
        ?>
</legend>
			<label id="jform_menus-lbl" for="jform_menus"><?php 
        echo JText::_('COM_MODULES_MODULE_ASSIGN');
        ?>
</label>

			<fieldset id="jform_menus" class="radio">
				<select name="jform[assignment]" id="jform_assignment">
					<?php 
        echo JHtml::_('select.options', ModulesHelper::getAssignmentOptions($this->item->client_id), 'value', 'text', $this->item->assignment, true);
        ?>
				</select>

			</fieldset>

			<label id="jform_menuselect-lbl" for="jform_menuselect"><?php 
        echo JText::_('JGLOBAL_MENU_SELECTION');
        ?>
</label>

			<button type="button" class="jform-assignments-button jform-rightbtn" onclick="$$('.chk-menulink').each(function(el) { el.checked = !el.checked; });">
				<?php 
        echo JText::_('JGLOBAL_SELECTION_INVERT');
        ?>
			</button>

			<button type="button" class="jform-assignments-button jform-rightbtn" onclick="$$('.chk-menulink').each(function(el) { el.checked = false; });">
				<?php 
        echo JText::_('JGLOBAL_SELECTION_NONE');
        ?>
			</button>

			<button type="button" class="jform-assignments-button jform-rightbtn" onclick="$$('.chk-menulink').each(function(el) { el.checked = true; });">
				<?php 
        echo JText::_('JGLOBAL_SELECTION_ALL');
        ?>
			</button>

			<div class="clr"></div>

			<div id="menu-assignment">

			<?php 
        echo JHtml::_('tabs.start', 'module-menu-assignment-tabs', array('useCookie' => 1));
        ?>

			<?php 
        foreach ($menuTypes as &$type) {
            echo JHtml::_('tabs.panel', $type->title ? $type->title : $type->menutype, $type->menutype . '-details');
            $count = count($type->links);
            $i = 0;
            if ($count) {
                ?>
//.........這裏部分代碼省略.........
開發者ID:jmangarret,項目名稱:webtuagencia24,代碼行數:101,代碼來源:modules.php


注:本文中的ModulesHelper::getAssignmentOptions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。