コード例 #1
0
 public function display($tpl = null)
 {
     $container = Prism\Container::getContainer();
     $this->option = JFactory::getApplication()->input->getCmd('option');
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->params = $this->state->get('params');
     $this->prepareItems($this->items);
     // Prepare social integration.
     $showAuthor = CrowdfundingHelper::isShowAuthor($this->items, $this->params);
     if ($showAuthor) {
         $usersIds = Prism\Utilities\ArrayHelper::getIds($this->items, 'user_id');
         $this->socialProfiles = CrowdfundingHelper::prepareIntegration($this->params->get('integration_social_platform'), $usersIds);
     }
     $this->layoutData = new stdClass();
     $this->layoutData->items = $this->items;
     $this->layoutData->params = $this->params;
     $this->layoutData->money = $this->getMoneyFormatter($container, $this->params);
     $this->layoutData->socialProfiles = $this->socialProfiles;
     $this->layoutData->imageFolder = $this->params->get('images_directory', 'images/crowdfunding');
     $this->prepareDocument();
     parent::display($tpl);
 }
コード例 #2
0
 public function display($tpl = null)
 {
     $this->app = JFactory::getApplication();
     $this->option = JFactory::getApplication()->input->getCmd('option');
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Get params
     $this->params = $this->state->get('params');
     /** @var  $this->params Joomla\Registry\Registry */
     // Prepare subcategories.
     $this->displaySubcategories = (bool) $this->params->get('category_show_subcategories', Prism\Constants::DO_NOT_DISPLAY);
     if ($this->displaySubcategories) {
         $this->prepareSubcategories();
     }
     $this->prepareItems($this->items);
     $container = Prism\Container::getContainer();
     // Prepare social integration.
     $showAuthor = CrowdfundingHelper::isShowAuthor($this->items, $this->params);
     if ($showAuthor) {
         $usersIds = Prism\Utilities\ArrayHelper::getIds($this->items, 'user_id');
         $this->socialProfiles = CrowdfundingHelper::prepareIntegration($this->params->get('integration_social_platform'), $usersIds);
     }
     $this->layoutData = new stdClass();
     $this->layoutData->items = $this->items;
     $this->layoutData->params = $this->params;
     $this->layoutData->money = $this->getMoneyFormatter($container, $this->params);
     $this->layoutData->socialProfiles = $this->socialProfiles;
     $this->layoutData->imageFolder = $this->params->get('images_directory', 'images/crowdfunding');
     // Get current category
     $categoryId = $this->app->input->getInt('id');
     $categories = Crowdfunding\Categories::getInstance('crowdfunding');
     $this->item = $categories->get($categoryId);
     $this->prepareDocument();
     parent::display($tpl);
 }