public function load() { $pccm = PcConfiguratorManager::getInstance($this->config, $this->args); $pccm->manageComponentLoadRequestBeforeLoad(); $allSelectedComponentsIdsArray = $pccm->getSelectedItemsIdsFromRequest(); $this->addParam("allSelectedComponentsIdsArray", $allSelectedComponentsIdsArray); $itemManager = ItemManager::getInstance($this->config, $this->args); $userLevel = $this->getUserLevel(); $requiredCategoriesFormulasArray = $this->getRequiredCategoriesFormulasArray(); $neededCategoriesIdsAndOrFormulaArray = $this->getNeededCategoriesIdsAndOrFormulaArray(); $selected_component_item_id = $this->getSelectedComponentItemId(); $search_text = null; if (isset($_REQUEST['search_component'])) { $search_text = $this->secure($_REQUEST['search_component']); } list($offset, $limit) = $this->getItemsOffsetAndLimit($search_text); $itemsDtos = $itemManager->getPccItemsByCategoryFormula($this->getUserId(), $userLevel, $requiredCategoriesFormulasArray, $neededCategoriesIdsAndOrFormulaArray, $offset, $limit, $selected_component_item_id, $search_text); $this->addParam("itemsDtos", $itemsDtos); $this->addParam("itemManager", $itemManager); $this->addParam('componentLoad', $this); $ci = $this->getComponentTypeIndex(); $this->addParam('componentName', $pccm->getComponentKeywordByIndex($ci)); $this->addParam('componentIndex', $ci); $this->addParam('pcmm', PccMessagesManager::getInstance($this->config, $this->args)); $this->addParam('tab_header_info_text', $this->getTabHeaderInfoText()); }
/** * Returns an singleton instance of this class * * @param object $config * @param object $args * @return */ public static function getInstance($config, $args) { if (self::$instance == null) { self::$instance = new PccMessagesManager($config, $args); } return self::$instance; }