Gets available Messaging instances in the list.
@param bool $force If true, foces to merge complete list from the storage.
@return array Returns an associative array where the index is the ID of each Catalog and the value
is the instance.
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();
    }
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;
    }
835667
public function get_extlinks( $force = false ) {

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

		$this->extlinks = array();
		if( !$this->exists ) return array();

		$tArray = array(
			'prop'     => 'extlinks',
			'titles'   => $this->title,
			'_code'    => 'el',
			'_lhtitle' => 'extlinks'
		);

		pecho( "Getting external links used on {$this->title}..\n\n", PECHO_NORMAL );

		$result = $this->wiki->listHandler( $tArray );

		if( count( $result ) > 0 ) {
			foreach( $result as $extlink ){
				$this->extlinks[] = $extlink['*'];
			}
		}

		return $this->extlinks;
	}
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();
    }
730509
public function getMessages($clear = false) {
        $messages = $this->getData('messages');
        if ( ! is_array($messages)) {
            $messages = array();
        }
        return $messages;
    }
471293
public function get_definition($force = false) {
        if ($this->definition === false || $force) {
            $this->load_definition();
        }
        return $this->definition;
    }
1088496
public function get_usergroups( $force = false ) {
		if( $force ) {

			$uiRes = $this->wiki->apiQuery(
				array(
					'action'  => 'query',
					'list'    => 'users',
					'ususers' => $this->username,
					'usprop'  => 'groups'
				)
			);

			$this->groups = $uiRes['query']['users'][0]['groups'];
		}
		return $this->groups;
	}
976312
protected function parseFirewalls($force = false)
    {
        if (null == $this->firewalls || $force) {
            $firewalls = ['pattern'=>null,'paths'=>[]];
            $pattern = '';

            foreach (Base::instance()->get('SECURITY.firewalls') ?: [] as $name => $config) {
                $pattern .= ($pattern?'|':'').$config['path'];
                $key = static::pathName($config['path']);
                $firewalls['paths'][$key] = [
                    'login_route' => $config['login_route'],
                    'roles' => $config['roles'],
                ];
            }

            if ($pattern) {
                $firewalls['pattern'] = '#(?<path>'.$pattern.')#';
            }

            $this->firewalls = $firewalls;
        }
    }
674344
public function get_namespaces( $force = false ) {
		if( is_null( $this->namespaces ) || $force ) {
			$tArray = array(
				'meta'   => 'siteinfo',
				'action' => 'query',
				'siprop' => 'namespaces'
			);
			$tRes = $this->apiQuery( $tArray );

			foreach( $tRes['query']['namespaces'] as $namespace ){
				$this->namespaces[$namespace['id']] = $namespace['*'];
				$this->allowSubpages[$namespace['id']] = ( ( isset( $namespace['subpages'] ) ) ? true : false );
			}
		}
		return $this->namespaces;
	}
327486
public function collect($force = false)
    {
        $active = $this->getPersistence()->get(self::class);
        if (!$active || $force) {
            $action = new GetActiveDeliveryExecution();
            $this->propagate($action);
            $active = $action->getNumberOfActiveActions();
            $this->getPersistence()->set(self::class, $active, $this->getOption(self::OPTION_TTL));
        }
        return $active;


    }
950595
public function getManager($force = false)
    {
        if ($force === true) {
            $this->wipe();
        }

        if (!$this->manager instanceof ObjectManager) {
            $this->manager = $this->buildManager();
        }

        return $this->manager;
    }
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;
    }
1040351
public function get_tokens( $force = false ) {
		Hooks::runHook( 'GetTokens', array( &$this->tokens ) );

		if( !$force && !empty( $this->tokens ) ) return $this->tokens;

		$tokens = $this->apiQuery(
			array(
				'action' => 'tokens',
				'type'   => 'block|delete|deleteglobalaccount|edit|email|import|move|options|patrol|protect|setglobalaccountstatus|unblock|watch'
			)
		);

		foreach( $tokens['tokens'] as $y => $z ){
			if( in_string( 'token', $y ) ) {
				$this->tokens[str_replace( 'token', '', $y )] = $z;
			}
		}

		$token = $this->apiQuery(
			array(
				'action'  => 'query',
				'list'    => 'users',
				'ususers' => $this->username,
				'ustoken' => 'userrights'
			)
		);

		if( isset( $token['query']['users'][0]['userrightstoken'] ) ) {
			$this->tokens['userrights'] = $token['query']['users'][0]['userrightstoken'];
		} else {
			pecho( "Error retrieving userrights token...\n\n", PECHO_FATAL );
			return array();
		}

		return $this->tokens;

	}
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;
    }
265049
public function getStaticContents($force = false) : CNabuSiteStaticContentList
    {
        if (!$this->isBuiltIn() &&
            ($this->nb_site_static_content_list->isEmpty() || $force)
        ) {
            $this->nb_site_static_content_list = CNabuSiteStaticContent::getStaticContentsForSite($this);
            $this->nb_site_static_content_list->sort();
        }

        return $this->nb_site_static_content_list;
    }
669586
public function info($force = null) {
		if (isset ( $force )) {
			$displayInfoAsString = ($force === true) ? true : false;
		} else {
			$displayInfoAsString = $this->_displayInfoAsString ();
		}
		return $this->loadView ( $this->_getFiles ()->getViewInfo (), [ "connected" => USession::get ( $this->_getUserSessionKey () ),"authURL" => $this->getBaseUrl (),"bodySelector" => $this->_getBodySelector () ], $displayInfoAsString );
	}
1054545
public function getTargets($force = false) : CNabuSiteTargetList
    {
        if (!$this->isBuiltIn() &&
            ($this->nb_site_target_list->isEmpty() || $force)
        ) {
            $this->nb_site_target_list->clear();
            $this->nb_site_target_list->merge(CNabuSiteTarget::getAllSiteTargets($this));
            $this->nb_site_target_list->iterate(function ($key, $nb_site_target) {
                $nb_site_target->setSite($this);
                return true;
            });
        }

        return $this->nb_site_target_list;
    }