public function display($tpl = null)
 {
     $this->option = JFactory::getApplication()->input->get('option');
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->params = $this->state->get('params');
     // Get currencies
     $currencies = array();
     foreach ($this->items as $item) {
         $currencies[] = $item->txn_currency;
     }
     $currencies = array_filter(array_unique($currencies));
     if (count($currencies) > 0) {
         $options = new Joomla\Registry\Registry();
         $options->set('locale_intl', $this->params->get('locale_intl'));
         $options->set('amount_format', $this->params->get('amount_format'));
         $this->currencies = new Crowdfunding\Currencies(JFactory::getDbo(), $options);
         $this->currencies->load(array('codes' => $currencies));
     }
     $this->money = $this->getMoneyFormatter($this->params);
     // Get enabled specific plugins.
     $extensions = new Prism\Extensions(JFactory::getDbo(), $this->specificPlugins);
     $this->enabledSpecificPlugins = $extensions->getEnabled();
     // Prepare sorting data
     $this->prepareSorting();
     // Prepare actions
     $this->addToolbar();
     $this->addSidebar();
     $this->setDocument();
     parent::display($tpl);
 }
Exemplo n.º 2
0
 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->params = $this->state->get("params");
     // Get currencies
     $currencies = array();
     foreach ($this->items as $item) {
         $currencies[] = $item->txn_currency;
     }
     $currencies = array_unique($currencies);
     if (!empty($currencies)) {
         $options = new Joomla\Registry\Registry();
         $options->set("locale_intl", $this->params->get("locale_intl"));
         $options->set("amount_format", $this->params->get("amount_format"));
         $this->currencies = new Crowdfunding\Currencies(JFactory::getDbo(), $options);
         $this->currencies->loadByCode($currencies);
     }
     $this->amount = new Crowdfunding\Amount($this->params);
     // Get enabled specefic plugins.
     $extensions = new Prism\Extensions(JFactory::getDbo(), $this->specificPlugins);
     $this->enabledSpecificPlugins = $extensions->getEnabled();
     // Add submenu
     CrowdfundingHelper::addSubmenu($this->getName());
     // Prepare sorting data
     $this->prepareSorting();
     // Prepare actions
     $this->addToolbar();
     $this->addSidebar();
     $this->setDocument();
     parent::display($tpl);
 }
 public function display($tpl = null)
 {
     $this->option = JFactory::getApplication()->input->get('option');
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Get parameters of com_crowdfunding.
     $this->cfParams = JComponentHelper::getParams('com_crowdfunding');
     // Get currencies
     $currencyCodes = array();
     foreach ($this->items as $item) {
         $currencyCodes[] = $item->txn_currency;
         $currencyCodes = array_unique($currencyCodes);
     }
     if (count($currencyCodes) > 0) {
         $this->currencies = new Crowdfunding\Currencies(JFactory::getDbo());
         $this->currencies->load(array('codes' => $currencyCodes));
         $this->money = $this->getMoneyFormatter($this->cfParams);
     }
     // Get project title.
     $search = $this->state->get('filter.search');
     if (JString::strlen($search) > 0 and strpos($search, 'pid') === 0) {
         $projectId = (int) substr($search, 4);
         $this->projectTitle = CrowdfundingHelper::getProjectTitle($projectId);
     }
     // Get enabled specific plugins.
     $extensions = new Prism\Extensions(JFactory::getDbo(), $this->specificPlugins);
     $this->enabledSpecificPlugins = $extensions->getEnabled();
     // Prepare sorting data
     $this->prepareSorting();
     // Prepare actions
     $this->addToolbar();
     $this->addSidebar();
     $this->setDocument();
     // Include HTML helper
     JLoader::register('JHtmlString', JPATH_LIBRARIES . '/joomla/html/html/string.php');
     parent::display($tpl);
 }
Exemplo n.º 4
0
 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Get parameters of com_crowdfunding.
     $this->cfParams = JComponentHelper::getParams("com_crowdfunding");
     // Get currencies
     foreach ($this->items as $item) {
         $currencies[] = $item->txn_currency;
         $currencies = array_unique($currencies);
     }
     if (!empty($currencies)) {
         $this->currencies = new Crowdfunding\Currencies(JFactory::getDbo());
         $this->currencies->load(array("codes" => $currencies));
         $this->amount = new Crowdfunding\Amount($this->cfParams);
     }
     // Get project title.
     $search = $this->state->get("filter.search");
     if (!empty($search) and 0 === strpos($search, "pid")) {
         $projectId = (int) substr($search, 4);
         $this->projectTitle = CrowdfundingHelper::getProjectTitle($projectId);
     }
     // Get enabled specific plugins.
     $extensions = new Prism\Extensions(JFactory::getDbo(), $this->specificPlugins);
     $this->enabledSpecificPlugins = $extensions->getEnabled();
     // Add submenu
     CrowdfundingFinanceHelper::addSubmenu($this->getName());
     // Prepare sorting data
     $this->prepareSorting();
     // Prepare actions
     $this->addToolbar();
     $this->addSidebar();
     $this->setDocument();
     // Include HTML helper
     JLoader::register('JHtmlString', JPATH_LIBRARIES . '/joomla/html/html/string.php');
     parent::display($tpl);
 }