本文整理汇总了PHP中CrowdfundingHelperRoute::getTransactionsRoute方法的典型用法代码示例。如果您正苦于以下问题:PHP CrowdfundingHelperRoute::getTransactionsRoute方法的具体用法?PHP CrowdfundingHelperRoute::getTransactionsRoute怎么用?PHP CrowdfundingHelperRoute::getTransactionsRoute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CrowdfundingHelperRoute
的用法示例。
在下文中一共展示了CrowdfundingHelperRoute::getTransactionsRoute方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display($tpl = null)
{
$userId = JFactory::getUser()->get("id");
if (!$userId) {
$this->app->enqueueMessage(JText::_("COM_CROWDFUNDING_ERROR_NOT_LOG_IN"), "notice");
$this->app->redirect(JRoute::_("index.php?option=com_users&view=login", false));
return;
}
$this->items = $this->get('Items');
$this->state = $this->get('State');
$this->pagination = $this->get('Pagination');
// Get params
/** @var $params Joomla\Registry\Registry */
$params = $this->state->get("params");
$this->params = $params;
if (!empty($this->items)) {
// Get currency
$currency = Crowdfunding\Currency::getInstance(JFactory::getDbo(), $this->params->get("project_currency"));
$this->amount = new Crowdfunding\Amount($this->params);
$this->amount->setCurrency($currency);
}
// Prepare filters
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$this->saveOrder = strcmp($this->listOrder, 'a.ordering') != 0 ? false : true;
$this->userId = JFactory::getUser()->get("id");
$this->redirectUrl = CrowdfundingHelperRoute::getTransactionsRoute();
$this->prepareDocument();
parent::display($tpl);
}
示例2: display
public function display($tpl = null)
{
$this->app = JFactory::getApplication();
$this->option = $this->app->input->get('option');
$userId = JFactory::getUser()->get('id');
if (!$userId) {
$this->app->enqueueMessage(JText::_('COM_CROWDFUNDING_ERROR_NOT_LOG_IN'), 'notice');
$this->app->redirect(JRoute::_('index.php?option=com_users&view=login', false));
return;
}
$this->items = $this->get('Items');
$this->state = $this->get('State');
$this->pagination = $this->get('Pagination');
$this->params = $this->state->get('params');
/** @var $params Joomla\Registry\Registry */
if (is_array($this->items) and count($this->items) > 0) {
$currency = Crowdfunding\Currency::getInstance(JFactory::getDbo(), $this->params->get('project_currency'));
$this->amount = new Crowdfunding\Amount($this->params);
$this->amount->setCurrency($currency);
}
// Prepare filters
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$this->saveOrder = strcmp($this->listOrder, 'a.ordering') === 0;
$this->userId = JFactory::getUser()->get('id');
$this->redirectUrl = CrowdfundingHelperRoute::getTransactionsRoute();
$this->prepareDocument();
parent::display($tpl);
}
示例3: foreach
foreach ($this->items as $item) {
$classRow = !$item->reward_state ? "" : 'class="success"';
$socialProfileLink = !$this->socialProfiles ? null : $this->socialProfiles->getLink($item->receiver_id);
?>
<tr <?php
echo $classRow;
?>
>
<td>
<?php
echo JHtml::_('crowdfunding.socialProfileLink', $socialProfileLink, $item->name);
?>
</td>
<td class="hidden-phone">
<a href="<?php
echo JRoute::_(CrowdfundingHelperRoute::getTransactionsRoute() . "&filter_search=id:" . $item->transaction_id);
?>
">
<?php
echo $item->txn_id;
?>
</a>
</td>
<td class="text-center">
<?php
$canEdit = $this->userId != $item->receiver_id ? false : true;
echo JHtml::_('crowdfunding.reward', $item->reward_id, $item->reward_name, $item->transaction_id, $item->reward_state, $canEdit, $this->redirectUrl);
?>
</td>
</tr>
<?php