Gets the full list of all Product Categories in this Commerce instance.
@param bool $force If true, forces to reload list form the database storage.
@return CNabuCommerceProductCategoryList Returns a Product Category List with all Categories.
167149
public function getProductCategories(bool $force = false) : CNabuCommerceProductCategoryList
    {
        if ($this->nb_commerce_product_category_list->isEmpty() || $force) {
            $this->nb_commerce_product_category_list->clear();
            $this->nb_commerce_product_category_list->merge(
                CNabuCommerceProductCategory::getCategoriesForCommerce($this)
            );
        }

        return $this->nb_commerce_product_category_list;
    }
353267
public function getMessagings($force = false)
    {
        if ($this->nb_messaging_list->isEmpty() || $force) {
            $this->nb_messaging_list->clear();
            $this->nb_messaging_list->merge(CNabuMessaging::getAllMessagings($this));
        }

        return $this->nb_messaging_list->getItems();
    }
390532
public function get_urls( $force = false ) {

		if( !$force && $this->urls !== null ) {
			return $this->urls;
		}

		$tArray = array(
			'action' => 'query',
			'prop'   => 'info',
			'inprop' => 'url',
			'titles' => $this->title,
		);

		pecho( "Getting the URLs for {$this->title}..\n\n", PECHO_NORMAL );

		$tRes = $this->wiki->apiQuery( $tArray );
		$info = $tRes['query']['pages'][$this->pageid];

		$this->urls = array();

		if( isset( $info['fullurl'] ) ) $this->urls['full'] = $info['fullurl'];
		if( isset( $info['editurl'] ) ) $this->urls['edit'] = $info['editurl'];

		return $this->urls;
	}
1059633
public function getProfiles(bool $force = false) : CNabuSiteUserList
    {
        if ($this->nb_site_user_list->isEmpty() || $force) {
            $this->nb_site_user_list->clear();
            $this->nb_site_user_list->merge(CNabuSiteUser::getSitesForUser($this));
        }

        return $this->nb_site_user_list;
    }
351309
public function getCTAs($force = false)
    {
        if ($this->nb_site_target_cta_list->isEmpty() || $force) {
            $this->nb_site_target_cta_list->clear();
            $this->nb_site_target_cta_list->merge(CNabuSiteTargetCTA::getSiteTargetCTAs($this));
            $translations = CNabuSiteTargetCTALanguage::getCTATranslationsForSiteTarget($this);
            if (is_array($translations) && count($translations) > 0) {
                foreach ($translations as $translation) {
                    $nb_site_target_cta = $this->nb_site_target_cta_list->getItem($translation->getSiteTargetCTAId());
                    if ($nb_site_target_cta instanceof CNabuSiteTargetCTA) {
                        $nb_site_target_cta->setTranslation($translation);
                    }
                }
            }
            $roles = CNabuSiteTargetCTARole::getCTARolesForSiteTarget($this);
            if (is_array($roles) && count($roles) > 0) {
                foreach ($roles as $role) {
                    $nb_site_target_cta = $this->nb_site_target_cta_list->getItem($role->getSiteTargetCTAId());
                    if ($nb_site_target_cta instanceof CNabuSiteTargetCTA) {
                        $nb_site_target_cta->addRole($role);
                    }
                }
            }
        }

        return $this->nb_site_target_cta_list;
    }
222652
public function getSiteRoles(bool $force = false) : CNabuSiteRoleList
    {
        if ($this->nb_site_role_list->isEmpty() || $force) {
            $this->nb_site_role_list->clear();
            $this->nb_site_role_list->merge(CNabuSiteRole::getSiteRolesForSite($this));
        }

        return $this->nb_site_role_list;
    }
1018674
public function getProductCategoryIds()
    {

        // initialize the array with the product's category IDs
        $categoryIds = array();

        // query whether or not category IDs are available for the actual product entity
        if (isset($this->productCategoryIds[$lastEntityId = $this->getLastEntityId()])) {
            $categoryIds = $this->productCategoryIds[$lastEntityId];
        }

        // return the array with the product's category IDs
        return $categoryIds;
    }
689553
public function getActiveServices(bool $force = false) : CNabuMessagingServiceList
    {
        if ($this->nb_messaging_service_list->isEmpty() || $force) {
            $this->nb_messaging_service_list->clear();
            if (($nb_messaging = $this->getMessaging()) instanceof CNabuMessaging &&
                !($nb_services_list = $nb_messaging->getActiveServices())->isEmpty()
            ) {
                $nb_services_list->iterate(function($key, CNabuMessagingService $nb_service) {
                    if ($nb_service->isTemplateConnected($this->getId())) {
                        $this->nb_messaging_service_list->addItem($nb_service);
                    }
                    return true;
                });
            }
        }

        return $this->nb_messaging_service_list;
    }
908505
public static function getList(bool $full = false)
    {
        $class = get_called_class();
        if (empty(self::$list[$class])) {
            self::$list[$class] = self::loadList();
        }
        
        $list = self::$list[$class];
        
        foreach ($list as $name => $sid) {
            if (static::isHidden($name)) {
                if (!$full)
                    unset($list[$name]);
                else
                    $list = self::updateHiddenValue($list, $name);
            }
        }

        return $list;
    }
278506
public static function build_all_paths($force = false) {
        self::init_levels();
        foreach (self::$alllevels as $classname) {
            $classname::build_paths($force);
        }

        // reset static course cache - it might have incorrect cached data
        accesslib_clear_all_caches(true);
    }
1082373
public function getCurrentCategory()
    {
        $currentCategory = $this->_coreRegistry->registry('current_category');
        if (null === $currentCategory) {
            // try if there is a product
            $currentProduct = $this->_coreRegistry->registry('product');
            if (null !== $currentProduct) {
                $productCatIds = $currentProduct->getCategoryIds();
                $firstCatId = reset($productCatIds);
                $currentCategory = $this->_categoryRepository->get(
                    $firstCatId,
                    $this->_storeManager->getStore()->getId()
                );
            }
        }
        return $currentCategory;
    }
715738
protected function getListProduct()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        $list = (array) $this->product->getList($conditions);
        $this->prepareListProduct($list);

        return $list;
    }
1172733
public function getAPILanguages(bool $force = false) : CNabuLanguageList
    {
        $nb_api = new CNabuLanguageList();
        $this->getLanguages($force)->iterate(function ($key, CNabuLanguage $nb_language) use ($nb_api) {
            if ($nb_language->isAPILanguage()) {
                $nb_api->addItem($nb_language);
            }
            return true;
        });

        return $nb_api;
    }
596228
static public function getProductsForCommerce($nb_commerce)
    {
        $nb_commerce_id = nb_getMixedValue($nb_commerce, NABU_COMMERCE_FIELD_ID);
        if (is_numeric($nb_commerce_id)) {
            $retval = CNabuCommerceProduct::buildObjectListFromSQL(
                'nb_commerce_product_id',
                'SELECT *
                   FROM nb_commerce_product
                  WHERE nb_commerce_id=%commerce_id$d',
                array(
                    'commerce_id' => $nb_commerce_id
                )
            );
            if ($nb_commerce instanceof CNabuCommerce) {
                $retval->setCommerce($nb_commerce);
            }
        } else {
            $retval = new CNabuCommerceProductCategoryList($nb_commerce instanceof CNabuCommerce ? $nb_commerce : null);
        }

        return $retval;
    }
416685
public function getProductListCollectionByIdCustomerId(
        CustomerTransfer $customerTransfer
    ): ProductListCollectionTransfer {
        $customerTransfer->requireIdCustomer();

        return $this->productListCustomerRepository
            ->getProductListCollectionByIdCustomer($customerTransfer->getIdCustomer());
    }
715856
public function getTags(bool $force = false)
    {
        if ($this->nb_catalog_tag_list->isEmpty() || $force) {
            $this->nb_catalog_tag_list->clear();
            $this->nb_catalog_tag_list->merge(
                CNabuCatalogTag::getAllCatalogTags($this)
            );
        }

        return $this->nb_catalog_tag_list;
    }
348763
public function PaginatedProducts($limit = 10)
    {
        $products = $this->SortedProducts();
        $filter = $this->getFilter();

        if (count($filter)) {
            $products = $products->filter($filter);
        }

        return PaginatedList::create(
            $products,
            $this->getRequest()
        )->setPageLength($limit);
    }