Gets the available list of Items. if the list is empty or $force is true then forces to complete the list
from the storage.
@param bool $force If true, the list is updated from the storage.
@return CNabuCatalogItemList Returns the list of available Items.
345406
public function getItems($force = false)
    {
        if ($this->nb_catalog_item_tree->isEmpty() || $force) {
            $this->nb_catalog_item_tree->populate();
        }

        return $this->nb_catalog_item_tree;
    }
255729
public function getProducts(bool $force = false) : CNabuCommerceProductList
    {
        if ($this->nb_commerce_product_list->isEmpty() || $force) {
            $this->nb_commerce_product_list->clear();
            $this->nb_commerce_product_list->merge(
                CNabuCommerceProduct::getProductsForCommerce($this)
            );
        }

        return $this->nb_commerce_product_list;
    }
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;
	}
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;
    }
60195
public function getVersions($force = false)
    {
        if ($this->nb_project_version_list === null) {
            $this->nb_project_version_list = new CNabuProjectVersionList();
        }

        if ($this->nb_project_version_list->isEmpty() || $force) {
            $this->nb_project_version_list->clear();
            $this->nb_project_version_list->merge(CNabuProjectVersion::getAllProjectVersions($this));
        }

        return $this->nb_project_version_list;
    }
1244130
public function getAdminMembers($force = false) : CNabuUserGroupMemberList
    {
        $this->getMembers($force);
        $nb_admin_list = new CNabuUserGroupMemberList();

        $this->nb_user_group_member_list->iterate(
            function($key, CNabuUserGroupMember $nb_user_group_member) use ($nb_admin_list)
            {
                if ($nb_user_group_member->getAdmin() === 'T' && $nb_user_group_member->getStatus() === 'E') {
                    $nb_admin_list->addItem($nb_user_group_member);
                }
                return true;
            }
        );

        return $nb_admin_list;
    }
1329955
public function getCustomStyle($force = false)
    {
        if ($this->getCustomStyleSetID() > 0 || $force) {
            $csr = StyleSet::getByID($this->getCustomStyleSetID());
            $theme = $this->c->getCollectionThemeObject();
            switch ($this->getBlockTypeHandle()) {
                case BLOCK_HANDLE_LAYOUT_PROXY:
                    $bs = new CoreAreaLayoutCustomStyle($csr, $this, $theme);
                    break;
                default:
                    $bs = new CustomStyle($csr, $this, $theme);
                    break;
            }

            return $bs;
        }
    }
1174705
public function getTemplates($force = false)
    {
        if ($this->nb_messaging_template_list === null) {
            $this->nb_messaging_template_list = new CNabuMessagingTemplateList();
        }

        if ($this->nb_messaging_template_list->isEmpty() || $force) {
            $this->nb_messaging_template_list->clear();
            $this->nb_messaging_template_list->merge(CNabuMessagingTemplate::getAllMessagingTemplates($this));
            $this->nb_messaging_template_list->iterate(function($key, CNabuMessagingTemplate $nb_template) {
                $nb_template->setMessaging($this);
                return true;
            });
        }

        return $this->nb_messaging_template_list;
    }
1300988
public function getProjects($force = false)
    {
        if ($this->nb_project_list === null) {
            $this->nb_project_list = new CNabuProjectList($this);
        }

        if ($force) {
            $this->nb_role_list->clear();
            $this->nb_project_list->merge(CNabuProject::getAllProjects($this));
        }

        return $this->nb_project_list->getItems();
    }
240400
public function loadMetaData( $force = false )
    {
        // Fetch metadata.
        if ( $this->filePath === false )
            return;

        if ( $force && isset( $GLOBALS['eZClusterInfo'][$this->filePath] ) )
            unset( $GLOBALS['eZClusterInfo'][$this->filePath] );

        // Checks for metadata stored in memory, useful for repeated access
        // to the same file in one request
        // TODO: On PHP5 turn into static member
        if ( isset( $GLOBALS['eZClusterInfo'][$this->filePath] ) )
        {
            $GLOBALS['eZClusterInfo'][$this->filePath]['cnt'] += 1;
            $this->_metaData = $GLOBALS['eZClusterInfo'][$this->filePath]['data'];
            return;
        }

        $metaData = self::$dbbackend->_fetchMetadata( $this->filePath );
        if ( $metaData )
            $this->_metaData = $metaData;
        else
            $this->_metaData = false;

        // Clean up old entries if the maximum count is reached
        if ( isset( $GLOBALS['eZClusterInfo'] ) &&
             count( $GLOBALS['eZClusterInfo'] ) >= self::INFOCACHE_MAX )
        {
            usort( $GLOBALS['eZClusterInfo'], function ( $a, $b ) {
                $a = $a['cnt'];
                $b = $b['cnt'];
                
                if ( $a == $b )
                {
                    return 0;
                }

                return $a > $b ? -1 : 1;
            });
            array_pop( $GLOBALS['eZClusterInfo'] );
        }
        $GLOBALS['eZClusterInfo'][$this->filePath] = array( 'cnt' => 1,
                                                            'data' => $metaData );
    }
824347
public function getRole($force = false)
     {
         if ($this->nb_role === null || $force) {
             $this->nb_role = null;
             if ($this->isValueNumeric('nb_role_id')) {
                 $nb_role = new CNabuRole($this);
                 if ($nb_role->isFetched()) {
                     $this->nb_role = $nb_role;
                 }
             }
         }

         return $this->nb_role;
     }
552344
public function getAdminUser($force = false) {

        if ($this->nb_admin_user === null || $force) {
            $this->nb_admin_user = null;
            if ($this->isValueNumeric('nb_server_admin_user_id')) {
                $nb_user = new CNabuUser($this->getAdminUserId());
                if ($nb_user->isFetched()) {
                    $this->nb_admin_user = $nb_user;
                }
            }
        }

        return $this->nb_admin_user;
    }
1170741
public function getCTAByKey($key, $force = false)
    {
        $this->getCTAs($force);

        return $this->nb_site_target_cta_list->getItem($key, CNabuSiteTargetCTAList::INDEX_KEY);
    }
601507
public function isOffline( $force = FALSE ){
		if( $this->status === self::STATUS_UNKNOWN || $force )
			$this->check();
		return $this->status === self::STATUS_OFFLINE;
	}
15671
public function get($force = false)
    {
        // Check if current set
        if (is_null(self::$current) || $force) {
            // Get environment variable (if set and valid)
            $releaseStage = trim(getenv('RELEASE_STAGE'));
            $releaseStage = in_array($releaseStage, $this->getAll()) ? $releaseStage : null;

            // If environment variable not set/valid, try to detect environment by url or path
            $releaseStage = $releaseStage ?: $this->determineFromPath();

            $releaseStage = $releaseStage ?: $this->detectAppServer();

            // If environment variable still not set, assume we are in production!
            $releaseStage = $releaseStage ?: self::PRODUCTION;

            self::$current = $releaseStage;
        }

        return self::$current;
    }
258595
public function get_allow_subpages( $force = false ) {
		if( is_null( $this->allowSubpages ) || $force ) {
			$this->get_namespaces( true );
		}
		return $this->allowSubpages;
	}
1194326
public function getProspectStatusTypes(bool $force = false) : CNabuIContactProspectStatusTypeList
    {
        if ($this->nb_icontact_prospect_status_type_list->isEmpty() || $force) {
            $this->nb_icontact_prospect_status_type_list->clear();
            $this->nb_icontact_prospect_status_type_list->merge(CNabuIContactProspectStatusType::getTypesForIContact($this));
        }

        return $this->nb_icontact_prospect_status_type_list;
    }