本文整理汇总了PHP中RSMembershipHelper::getMembershipsList方法的典型用法代码示例。如果您正苦于以下问题:PHP RSMembershipHelper::getMembershipsList方法的具体用法?PHP RSMembershipHelper::getMembershipsList怎么用?PHP RSMembershipHelper::getMembershipsList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RSMembershipHelper
的用法示例。
在下文中一共展示了RSMembershipHelper::getMembershipsList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInput
public function getInput()
{
$options = array();
$multiple = $this->element['multiple'] ? 'multiple="multiple"' : '';
$size = $this->element['size'] ? 'size="' . $this->element['size'] . '"' : '';
$onchange = $this->element['onchange'] ? 'onchange="' . $this->element['onchange'] . '"' : '';
$all_membs = RSMembershipHelper::getMembershipsList();
$options = array_merge($options, $all_membs);
return JHTML::_('select.genericlist', $options, $this->name, 'class="' . $this->element['class'] . '" ' . $onchange . ' ' . $multiple . ' ' . $size, 'value', 'text', $this->value, $this->id);
}
示例2: _getDefaultFilters
public function _getDefaultFilters()
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$filters = array();
// set the default values for fields in xml
$filters['report'] = 'report_2';
$filters['from_date'] = '';
$filters['to_date'] = RSMembershipHelper::showDate(JFactory::getDate()->toUnix(), 'Y-m-d');
$filters['unit'] = 'day';
$filters['user_id'] = '';
$filters['memberships'] = array_keys(RSMembershipHelper::getMembershipsList(false));
$filters['status_memberships'] = array(0, 1, 2, 3);
$filters['status_transactions'] = array('pending', 'completed', 'denied');
$filters['price_from'] = 0;
$filters['price_to'] = '';
$filters['transaction_types'] = array('new', 'upgrade', 'addextra', 'renew');
$query->select('DISTINCT(gateway)')->from($db->qn('#__rsmembership_transactions'))->order($db->qn('gateway') . ' ASC');
$db->setQuery($query);
$filters['gateways'] = $db->loadColumn();
return $filters;
}