本文整理汇总了PHP中RSMembershipHelper::getFields方法的典型用法代码示例。如果您正苦于以下问题:PHP RSMembershipHelper::getFields方法的具体用法?PHP RSMembershipHelper::getFields怎么用?PHP RSMembershipHelper::getFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RSMembershipHelper
的用法示例。
在下文中一共展示了RSMembershipHelper::getFields方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
$mainframe =& JFactory::getApplication();
// get parameters
$params = clone $mainframe->getParams('com_rsmembership');
$pathway =& $mainframe->getPathway();
$pathway->addItem(JText::_('RSM_RENEW'), '');
// token
$token = JHTML::_('form.token');
// get the current layout
$layout = $this->getLayout();
if ($layout == 'default') {
$this->assign('payments', RSMembership::getPlugins());
// get the encoded return url
$return = base64_encode(JRequest::getURI());
$this->assignRef('return', $return);
$data = $this->get('data');
$this->assignRef('data', $data);
// get the membership
$membership = $this->get('membership');
$this->assignRef('membership', $membership);
$this->assignRef('fields', RSMembershipHelper::getFields(false));
} elseif ($layout == 'payment') {
$this->assignRef('html', $this->get('html'));
}
// get the extra
$this->assignRef('extra', $this->get('extra'));
$this->assignRef('cid', $this->get('cid'));
$this->assignRef('config', $this->get('config'));
$this->assignRef('params', $params);
$this->assignRef('user', $this->get('user'));
$this->assignRef('token', $token);
$this->assign('currency', RSMembershipHelper::getConfig('currency'));
parent::display();
}
示例2: display
function display($tpl = null)
{
$app = JFactory::getApplication();
// get parameters
$params = clone $app->getParams('com_rsmembership');
$pathway = $app->getPathway();
$pathway->addItem(JText::_('COM_RSMEMBERSHIP_RENEW'), '');
// get the logged user
$this->user = JFactory::getUser();
// get the current layout
$layout = $this->getLayout();
if ($layout == 'default') {
$this->payments = RSMembership::getPlugins();
// get the encoded return url
$this->return = base64_encode(JURI::getInstance());
$this->data = $this->get('data');
// get the membership
$this->membership = $this->get('membership');
$this->membershipterms = $this->get('membershipterms');
$this->fields = RSMembershipHelper::getFields(true);
$this->fields_validation = RSMembershipHelper::getFieldsValidation($this->membership->id);
$this->membership_fields = RSMembershipHelper::getMembershipFields($this->membership->id, true, $this->user->id, true, $this->membership->last_transaction_id);
} elseif ($layout == 'payment') {
$this->html = $this->get('html');
}
// get the extras
$this->extras = $this->get('extras');
$this->cid = $this->get('cid');
$this->config = $this->get('config');
$this->params = $params;
$this->token = JHTML::_('form.token');
$this->currency = RSMembershipHelper::getConfig('currency');
parent::display();
}
示例3: display
public function display($tpl = null)
{
$this->field = $this->get('RSFieldset');
// field
$this->tabs = $this->get('RSTabs');
// tabs
$this->form = $this->get('Form');
// get subscriber xml form
// get fieldsets -> used to get the label
$this->fieldsets = $this->form->getFieldsets();
// get subscriber
$this->item = $this->get('Item');
$this->temp = true;
$this->cache = $this->get('Cache');
$show_edit = $this->temp ? false : true;
$user_id = $this->item->user_id;
$show_required = false;
$transaction_id = $this->temp ? $this->item->transaction : 0;
$this->custom_fields = RSMembershipHelper::getFields($show_edit, $user_id, $show_required, $transaction_id);
$this->addToolbar();
parent::display($tpl);
}
示例4: display
function display($tpl = null)
{
if ($tpl == 'memberships') {
parent::display($tpl);
return true;
}
JToolBarHelper::title('RSMembership!', 'rsmembership');
JSubMenuHelper::addEntry(JText::_('RSM_TRANSACTIONS'), 'index.php?option=com_rsmembership&view=transactions');
JSubMenuHelper::addEntry(JText::_('RSM_MEMBERSHIPS'), 'index.php?option=com_rsmembership&view=memberships');
JSubMenuHelper::addEntry(JText::_('RSM_CATEGORIES'), 'index.php?option=com_rsmembership&view=categories');
JSubMenuHelper::addEntry(JText::_('RSM_MEMBERSHIP_EXTRAS'), 'index.php?option=com_rsmembership&view=extras');
JSubMenuHelper::addEntry(JText::_('RSM_MEMBERSHIP_UPGRADES'), 'index.php?option=com_rsmembership&view=upgrades');
JSubMenuHelper::addEntry(JText::_('RSM_COUPONS'), 'index.php?option=com_rsmembership&view=coupons');
JSubMenuHelper::addEntry(JText::_('RSM_PAYMENT_INTEGRATIONS'), 'index.php?option=com_rsmembership&view=payments');
JSubMenuHelper::addEntry(JText::_('RSM_FILES'), 'index.php?option=com_rsmembership&view=files');
JSubMenuHelper::addEntry(JText::_('RSM_FILE_TERMS'), 'index.php?option=com_rsmembership&view=terms');
JSubMenuHelper::addEntry(JText::_('RSM_USERS'), 'index.php?option=com_rsmembership&view=users', true);
JSubMenuHelper::addEntry(JText::_('RSM_FIELDS'), 'index.php?option=com_rsmembership&view=fields');
JSubMenuHelper::addEntry(JText::_('RSM_REPORTS'), 'index.php?option=com_rsmembership&view=reports');
JSubMenuHelper::addEntry(JText::_('RSM_CONFIGURATION'), 'index.php?option=com_rsmembership&view=configuration');
JSubMenuHelper::addEntry(JText::_('RSM_UPDATES'), 'index.php?option=com_rsmembership&view=updates');
$task = JRequest::getVar('task', '');
$this->assign('temp', $this->get('TempId'));
if ($task == 'edit') {
JToolBarHelper::title('RSMembership! <small>[' . JText::_('RSM_EDIT_MEMBERSHIP_USER') . ']</small>', 'rsmembership');
if (!$this->temp) {
JToolBarHelper::apply();
JToolBarHelper::save();
}
JToolBarHelper::cancel();
$params = array();
$params['startOffset'] = JRequest::getInt('tabposition', 0);
$tabs =& JPane::getInstance('Tabs', $params, true);
$this->assignRef('tabs', $tabs);
$row = $this->get('user');
$this->assignRef('row', $row);
$show_edit = $this->temp ? false : true;
$user_id = $this->temp ? 0 : $row->user_id;
$show_required = false;
$transaction_id = $this->temp ? $this->temp : 0;
$this->assignRef('fields', RSMembershipHelper::getFields($show_edit, $user_id, $show_required, $transaction_id));
$this->assignRef('transactions', $this->get('transactions'));
$this->assignRef('cache', $this->get('cache'));
} elseif ($task == 'editmembership') {
$row = $this->get('membership');
$all_memberships = $this->get('memberships');
$memberships = array();
$categories = array();
foreach ($all_memberships as $membership) {
$categories[$membership->category_id][] = $membership;
}
foreach ($categories as $category_id => $cat_memberships) {
$optgroup = new stdClass();
$optgroup->value = '<OPTGROUP>';
$optgroup->text = isset($cat_memberships[0]) ? $cat_memberships[0]->category_name : '';
$memberships[] = $optgroup;
foreach ($cat_memberships as $membership) {
$memberships[] = JHTML::_('select.option', $membership->id, $membership->name);
}
$optgroup = new stdClass();
$optgroup->value = '</OPTGROUP>';
$optgroup->text = '';
$memberships[] = $optgroup;
}
unset($all_memberships);
unset($categories);
$date = JFactory::getDate();
$this->assign('now', $date->toUnix());
$this->assignRef('periods', $this->get('periods'));
$lists['membership'] = JHTML::_('select.genericlist', $memberships, 'membership_id', 'onchange="rsmembership_change_membership(1)"', 'value', 'text', $row->membership_id);
$all_extras = $this->get('extras');
$all_extravalues = $this->get('extravalues');
$extras = array();
foreach ($all_extras as $extra_id => $extra_text) {
$extras[] = JHTML::_('select.optgroup', $extra_text);
if (isset($all_extravalues[$extra_id])) {
foreach ($all_extravalues[$extra_id] as $extra_value_id => $extra_value_text) {
$extras[] = JHTML::_('select.option', $extra_value_id, $extra_value_text);
}
}
$close = new stdClass();
$close->value = '</OPTGROUP>';
$close->text = '';
$extras[] = $close;
}
$this->assign('hasExtras', count($all_extras) > 0);
$lists['extras'] = JHTML::_('select.genericlist', $extras, 'extras[]', 'size="5" multiple="multiple"' . ($row->noextra ? ' disabled="disabled"' : ''), 'value', 'text', $row->extras, 'extras');
$statuses = RSMembershipHelper::getStatuses();
$lists['status'] = JHTML::_('select.genericlist', $statuses, 'status', '', 'value', 'text', $row->status, 'rsm_status');
$lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $row->published);
$this->assignRef('row', $row);
$this->assignRef('lists', $lists);
$editor =& JFactory::getEditor();
$this->assignRef('editor', $editor);
$this->assign('function', 'addmemberships');
} else {
JToolBarHelper::editListX('edit');
$this->assignRef('sortColumn', JRequest::getVar('filter_order', 'u.name'));
$this->assignRef('sortOrder', JRequest::getVar('filter_order_Dir', 'ASC'));
$this->assignRef('users', $this->get('users'));
//.........这里部分代码省略.........