load and return ratioList

@param  bool $force // force reload (no cache)
@return array

@throws \Tbbc\MoneyBundle\MoneyException
179625
public function loadRatioList($force = false)
    {
        if (($force === false) && (count($this->ratioList) > 0)) {
            return $this->ratioList;
        }

        $repository = $this->objectManager->getRepository('Tbbc\MoneyBundle\Entity\DoctrineStorageRatio');
        $doctrineStorageRatios = $repository->findAll();

        // FIXME
        // if filename doesn't exist, init with only reference currency code
        if (0 === count($doctrineStorageRatios)) {
            $this->ratioList = array($this->referenceCurrencyCode => 1.0);
            $this->saveRatioList($this->ratioList);

            return $this->ratioList;
        }

        $this->ratioList = array();

        foreach ($doctrineStorageRatios as $doctrineStorageRatio) {
            $this->ratioList[$doctrineStorageRatio->getCurrencyCode()] = $doctrineStorageRatio->getRatio();
        }

        return $this->ratioList;
    }
1283033
function getAllRoles($force = false)
    {
        if ($force == false and ! is_null($this->_cache_perms)) {
            return $this->_cache_perms;
        }
        $this->_cache_perms = array();
        // load group permissions
        $this->_cache_perms = (array) $this->get_roles_list();
        return $this->_cache_perms;
    }
936120
public function provideFlatten($force = TRUE) {

     if ($this->isEmpty()) {
       $this->flattenjson = [];
     }
     else {
       if ($this->flattenjson == NULL || $force) {
         $mainproperty = $this->mainPropertyName();
         $jsonArray = json_decode($this->{$mainproperty}, TRUE, 10);
         $flattened = [];
         StrawberryfieldJsonHelper::arrayToFlatCommonkeys(
           $jsonArray,
           $flattened,
           TRUE
         );
         $this->flattenjson = $flattened;
       }
     }
     return $this->flattenjson;
   }
1079705
public function getCatalogs($force = false)
    {
        if ($this->nb_catalog_list->isEmpty() || $force) {
            $this->nb_catalog_list->clear();
            $this->nb_catalog_list->merge(CNabuCatalog::getAllCatalogs($this));
        }

        return $this->nb_catalog_list->getItems();
    }
765122
public function render($force = false) {

		if(empty($this->html) || $force) {

			$attr = [];
			foreach($this->attributes as $k => $v) {
				$attr[] = sprintf('%s="%s"', $k, $v);
			}

			$options = [];
			foreach($this->options as $o) {
				$options[] = $o->render();
			}

			$this->html = sprintf('<select name="%s" %s>%s</select>',
				$this->getName(),
				implode(' ', $attr),
				"\n" . implode("\n", $options) . "\n"
			);
		}

		return $this->html;
	}
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;
	}
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;
    }
482745
public function render($force = false) {

        if(empty($this->html) || $force) {

            $attr = [
                sprintf('src="%s"', $this->getValue()),
                'type="image"'
            ];

            foreach($this->attributes as $k => $v) {

                if(in_array(strtolower($k), ['src', 'value', 'type'])) {
                    continue;
                }
                $attr[] = sprintf('%s="%s"', $k, $v);

            }

            $this->html = sprintf('<input name="%s" %s>',
                $this->getName(),
                implode(' ', $attr)
            );

        }

        return $this->html;

	}
175379
public function update(string $ref, string $sha, bool $force = false): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/git/refs/:ref',
            $this->getGitData()->getOwner(), $this->getGitData()->getRepo(), $ref), Request::METHOD_POST, [
                'sha'   => $sha,
                'force' => $force
            ]);
    }
480805
public function reset($force = false)
    {
        $this->isBroadcast = false;
        $this->to = [];

        if ($force) {
            $this->sender = null;
            $this->userId = null;
        }

        return $this;
    }
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;
    }
304166
static function fetchList( $conditions = null, $asObjects = true, $offset = false, $limit = false, $asHash = true )
    {
        $currencyList = array();
        $sort = null;
        $limitation = null;
        if ( $offset !== false or $limit !== false )
            $limitation = array( 'offset' => $offset, 'length' => $limit );

        $rows = eZPersistentObject::fetchObjectList( eZCurrencyData::definition(),
                                                     null,
                                                     $conditions,
                                                     $sort,
                                                     $limitation,
                                                     $asObjects );

        if ( count( $rows ) > 0 )
        {
            if ( $asHash )
            {
                $keys = array_keys( $rows );
                foreach ( $keys as $key )
                {
                    if ( $asObjects )
                        $currencyList[$rows[$key]->attribute( 'code' )] = $rows[$key];
                    else
                        $currencyList[$rows[$key]['code']] = $rows[$key];
                }
            }
            else
            {
                $currencyList = $rows;
            }
        }

        return $currencyList;
    }
796041
public function render($force = false) {

        if(empty($this->html) || $force) {

            if($this->selected) {
                $this->attributes['selected'] = 'selected';
            }
            else {
                unset($this->attributes['selected']);
            }

            $this->attributes['value'] = $this->getValue();

            $attr = [];

            foreach($this->attributes as $k => $v) {
                $attr[] = sprintf('%s="%s"', $k, $v);
            }

            $this->html = sprintf(
				'<option %s>%s</option>',
                implode(' ', $attr),
				$this->getLabel()->getLabelText()
			);
		}

		return $this->html;

	}
991462
public function check($force = false)
    {
        /*
         * Already know about updates, never retry.
         */
        $oldCount = Parameter::get('system::update.count');
        if ($oldCount > 0) {
            return $oldCount;
        }

        /*
         * Retry period not passed, skipping.
         */
        if (!$force
            && ($retryTimestamp = Parameter::get('system::update.retry'))
            && Carbon::createFromTimeStamp($retryTimestamp)->isFuture()
        ) {
            return $oldCount;
        }

        try {
            $result = $this->requestUpdateList();
            $newCount = array_get($result, 'update', 0);
        }
        catch (Exception $ex) {
            $newCount = 0;
        }

        /*
         * Remember update count, set retry date
         */
        Parameter::set('system::update.count', $newCount);
        Parameter::set('system::update.retry', Carbon::now()->addHours(24)->timestamp);

        return $newCount;
    }
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;
    }
423286
public function refresh(bool $force = false, bool $cascade = false) : bool
    {
        $this->relinkDB();
        return $this->load();
    }
1185779
public function getRoles(bool $force = false) : CNabuRoleList
    {
        if ($this->nb_role_list->isEmpty() || $force) {
            $this->nb_role_list->fillFromSite($this);
        }

        return $this->nb_role_list;
    }