本文整理汇总了PHP中JemHelper::getAccesslevelOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP JemHelper::getAccesslevelOptions方法的具体用法?PHP JemHelper::getAccesslevelOptions怎么用?PHP JemHelper::getAccesslevelOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JemHelper
的用法示例。
在下文中一共展示了JemHelper::getAccesslevelOptions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display($tpl = null)
{
// Initialise variables.
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->state = $this->get('State');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
JHtml::_('behavior.framework');
JHtml::_('behavior.modal', 'a.modal');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
//initialise variables
$jemsettings = JemHelper::config();
$document = JFactory::getDocument();
$user = JemFactory::getUser();
$this->settings = JemAdmin::config();
$task = JFactory::getApplication()->input->get('task', '');
$this->task = $task;
$url = JUri::root();
$categories = JemCategories::getCategoriesTree(1);
$selectedcats = $this->get('Catsselected');
$Lists = array();
$Lists['category'] = JemCategories::buildcatselect($categories, 'cid[]', $selectedcats, 0, 'multiple="multiple" size="8"');
// Load css
JHtml::_('stylesheet', 'com_jem/backend.css', array(), true);
// Load scripts
JHtml::_('script', 'com_jem/attachments.js', false, true);
JHtml::_('script', 'com_jem/recurrence.js', false, true);
JHtml::_('script', 'com_jem/unlimited.js', false, true);
JHtml::_('script', 'com_jem/seo.js', false, true);
// JQuery noConflict
//$document->addCustomTag('<script type="text/javascript">jQuery.noConflict();</script>');
//$document->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js');
//$document->addScript('http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js');
$access2 = JemHelper::getAccesslevelOptions();
$this->access = $access2;
$this->jemsettings = $jemsettings;
$this->Lists = $Lists;
$this->addToolbar();
parent::display($tpl);
}
示例2: display
public function display($tpl = null)
{
// Initialise variables.
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->state = $this->get('State');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
//initialise variables
$jemsettings = JemHelper::config();
$document = JFactory::getDocument();
$user = JFactory::getUser();
$this->settings = JemAdmin::config();
$task = JFactory::getApplication()->input->get('task');
$this->task = $task;
$url = JUri::root();
$categories = JemCategories::getCategoriesTree(1);
$selectedcats = $this->get('Catsselected');
$Lists = array();
$Lists['category'] = JemCategories::buildcatselect($categories, 'cid[]', $selectedcats, 0, 'multiple="multiple" size="8"');
// Load css
JHtml::_('stylesheet', 'com_jem/backend.css', array(), true);
// Load scripts
JHtml::_('script', 'com_jem/attachments.js', false, true);
JHtml::_('script', 'com_jem/recurrence.js', false, true);
JHtml::_('script', 'com_jem/seo.js', false, true);
JHtml::_('script', 'com_jem/slider-state.js', false, true);
$this->access = JemHelper::getAccesslevelOptions();
$this->jemsettings = $jemsettings;
$this->Lists = $Lists;
$this->addToolbar();
parent::display($tpl);
}
示例3: display
//.........这里部分代码省略.........
$title = ($item->id == 0) ? JText::_('COM_JEM_EDITVENUE_VENUE_ADD')
: JText::sprintf('COM_JEM_EDITVENUE_VENUE_EDIT', $item->venue);
if ($useMenuItemParams) {
$pagetitle = $menuitem->title ? $menuitem->title : $title;
$params->def('page_title', $pagetitle);
$params->def('page_heading', $pagetitle);
$pathway->setItemName(1, $pagetitle);
// Load layout from menu item if one is set else from venue if there is one set
if (isset($menuitem->query['layout'])) {
$this->setLayout($menuitem->query['layout']);
} elseif ($layout = $item->params->get('venue_layout')) {
$this->setLayout($layout);
}
$item->params->merge($params);
} else {
$pagetitle = $title;
$params->set('page_title', $pagetitle);
$params->set('page_heading', $pagetitle);
$params->set('show_page_heading', 1); // ensure page heading is shown
$params->set('introtext', ''); // there is no introtext in that case
$params->set('showintrotext', 0);
$pathway->addItem($pagetitle, ''); // link not required here so '' is ok
// Check for alternative layouts (since we are not in an edit-venue menu item)
// Load layout from venue if one is set
if ($layout = $item->params->get('venue_layout')) {
$this->setLayout($layout);
}
$temp = clone($params);
$temp->merge($item->params);
$item->params = $temp;
}
$publisher = $user->can('publish', 'venue', $item->id, $item->created_by);
if (!empty($this->item) && isset($this->item->id)) {
// $this->item->images = json_decode($this->item->images);
// $this->item->urls = json_decode($this->item->urls);
$tmp = new stdClass();
// $tmp->images = $this->item->images;
// $tmp->urls = $this->item->urls;
$this->form->bind($tmp);
}
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseWarning(500, implode("\n", $errors));
return false;
}
JHtml::_('behavior.framework');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.tooltip');
$access2 = JemHelper::getAccesslevelOptions(true);
$this->access = $access2;
// Load css
JemHelper::loadCss('geostyle');
JemHelper::loadCss('jem');
JemHelper::loadCustomCss();
JemHelper::loadCustomTag();
// Load script
JHtml::_('script', 'com_jem/attachments.js', false, true);
JHtml::_('script', 'com_jem/other.js', false, true);
$document->addScript('http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places&language='.$language);
// Noconflict
$document->addCustomTag( '<script type="text/javascript">jQuery.noConflict();</script>' );
// JQuery scripts
$document->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js');
JHtml::_('script', 'com_jem/jquery.geocomplete.js', false, true);
// No permissions required/useful on this view
$permissions = new stdClass();
$this->pageclass_sfx = htmlspecialchars($item->params->get('pageclass_sfx'));
$this->jemsettings = $jemsettings;
$this->settings = $settings;
$this->permissions = $permissions;
$this->limage = JemImage::flyercreator($this->item->locimage, 'venue');
$this->infoimage = JHtml::_('image', 'com_jem/icon-16-hint.png', JText::_('COM_JEM_NOTES'), NULL, true);
$this->user = $user;
if (!$publisher) {
$this->form->setFieldAttribute('published', 'default', 0);
$this->form->setFieldAttribute('published', 'readonly', 'true');
}
$this->_prepareDocument();
parent::display($tpl);
}
示例4: display
//.........这里部分代码省略.........
} else {
// Check if user can edit
$maintainer = JemUser::venuegroups('edit');
$genaccess = JemUser::editaccess($jemsettings->venueowner, $this->item->created_by, $jemsettings->venueeditrec, $jemsettings->venueedit);
if ($maintainer || $genaccess) {
$edit = true;
} else {
$edit = false;
}
$authorised = $this->item->params->get('access-edit') || $edit;
}
if ($authorised !== true) {
$app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error');
return false;
}
// Decide which parameters should take priority
$useMenuItemParams = $menuitem && $menuitem->query['option'] == 'com_jem' && $menuitem->query['view'] == 'editvenue' && 0 == $item->id;
// menu item is always for new venues
$title = $item->id == 0 ? JText::_('COM_JEM_EDITVENUE_VENUE_ADD') : JText::sprintf('COM_JEM_EDITVENUE_VENUE_EDIT', $item->venue);
if ($useMenuItemParams) {
$pagetitle = $menuitem->title ? $menuitem->title : $title;
$params->def('page_title', $pagetitle);
$params->def('page_heading', $pagetitle);
$pathway->setItemName(1, $pagetitle);
// Load layout from menu item if one is set else from venue if there is one set
if (isset($menuitem->query['layout'])) {
$this->setLayout($menuitem->query['layout']);
} elseif ($layout = $item->params->get('venue_layout')) {
$this->setLayout($layout);
}
$item->params->merge($params);
} else {
$pagetitle = $title;
$params->set('page_title', $pagetitle);
$params->set('page_heading', $pagetitle);
$params->set('show_page_heading', 1);
// ensure page heading is shown
$params->set('introtext', '');
// there is no introtext in that case
$params->set('showintrotext', 0);
$pathway->addItem($pagetitle, '');
// link not required here so '' is ok
// Check for alternative layouts (since we are not in an edit-venue menu item)
// Load layout from venue if one is set
if ($layout = $item->params->get('venue_layout')) {
$this->setLayout($layout);
}
$temp = clone $params;
$temp->merge($item->params);
$item->params = $temp;
}
if (!empty($this->item) && isset($this->item->id)) {
// $this->item->images = json_decode($this->item->images);
// $this->item->urls = json_decode($this->item->urls);
$tmp = new stdClass();
// $tmp->images = $this->item->images;
// $tmp->urls = $this->item->urls;
$this->form->bind($tmp);
}
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseWarning(500, implode("\n", $errors));
return false;
}
$access2 = JemHelper::getAccesslevelOptions();
$this->access = $access2;
// Load css
JemHelper::loadCss('geostyle');
JemHelper::loadCss('jem');
JemHelper::loadCustomCss();
JemHelper::loadCustomTag();
// Load script
JHtml::_('bootstrap.framework');
JHtml::_('script', 'com_jem/attachments.js', false, true);
# retrieve mapType setting
$settings = JemHelper::globalattribs();
$mapType = $settings->get('mapType', '0');
switch ($mapType) {
case '0':
$type = '"roadmap"';
break;
case '1':
$type = '"satellite"';
break;
case '2':
$type = '"hybrid"';
break;
case '3':
$type = '"terrain"';
break;
}
$this->mapType = $type;
$this->pageclass_sfx = htmlspecialchars($item->params->get('pageclass_sfx'));
$this->jemsettings = $jemsettings;
$this->limage = JemImage::flyercreator($this->item->locimage, 'venue');
$this->infoimage = JHtml::_('image', 'com_jem/icon-16-hint.png', JText::_('COM_JEM_NOTES'), NULL, true);
$this->user = $user;
$this->_prepareDocument();
parent::display($tpl);
}