Fetches tag identified with provided remote ID

@static

@param string $remoteID
@param mixed $language

@return array
765026
static public function fetchTagByRemoteID( $remoteID, $language = false )
    {
        if ( $language )
        {
            if ( !is_array( $language ) )
                $language = array( $language );
            eZContentLanguage::setPrioritizedLanguages( $language );
        }

        $result = eZTagsObject::fetchByRemoteID( $remoteID );

        if ( $language )
            eZContentLanguage::clearPrioritizedLanguages();

        if ( $result instanceof eZTagsObject )
            return array( 'result' => $result );

        return array( 'result' => false );
    }
271852
function remoteID()
    {
        $remoteID = $this->attribute( 'remote_id', true );
        if ( !$remoteID &&
             $this->Version == eZContentClass::VERSION_STATUS_DEFINED )
        {
            $this->setAttribute( 'remote_id', eZRemoteIdUtility::generate( 'class' ) );
            $this->sync( array( 'remote_id' ) );
            $remoteID = $this->attribute( 'remote_id', true );
        }

        return $remoteID;
    }
309509
protected function getFromCache(Block $block, Language $language)
    {
        if ($block->is_cacheable) {
            return cache()->tags(['blocks'])->get('blocks:cache:' . $block->id . ':' . $language->code, null);
        }
        return null;
    }
149083
private function loadContent(int $contentId, string $language): Content
    {
        return $this->repository->getContentService()->loadContent($contentId, [$language]);
    }
1279554
public function getLink($languageId = null)
    {
        return $this->_addPageNrParam($this->getBaseLink($languageId), $this->getActPage(), $languageId);
    }
984127
public function fetchSeoUrl($standardUrl, $languageId = null)
    {
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $languageId = isset($languageId) ? ((int) $languageId) : \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();

        $shopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();

        $utilsUrl = \OxidEsales\Eshop\Core\Registry::getUtilsUrl();
        $urlParameters = $utilsUrl->stringToParamsArray($standardUrl);
        $noPageNrStandardUrl = $utilsUrl->cleanUrlParams($utilsUrl->cleanUrl($standardUrl, ['pgNr']));
        $postfix = isset($urlParameters['pgNr']) ? 'pgNr=' . $urlParameters['pgNr'] : '';

        $query = "SELECT `oxseourl` FROM `oxseo` WHERE `oxstdurl` = ? AND `oxlang` = ? AND `oxshopid` = ? LIMIT 1";
        $result = $database->getOne($query, [$noPageNrStandardUrl, $languageId, $shopId]);
        $result = ((false !== $result) && !empty($postfix)) ? $utilsUrl->appendParamSeparator($result) . $postfix : $result;

        return $result;
    }
226545
public function getEntry($language, $entryId)
    {
        if (isset($this->entries[$language]) && isset($this->entries[$language][$entryId])) {
            return $this->entries[$language][$entryId];
        }
        return null;
    }
1166652
public function getTranslation($language_id = null)
    {
        /** @var ActiveRecord $translation */

        /** @var \DevGroup\Multilingual\Multilingual $multilingual */
        $multilingual = Yii::$app->multilingual;
        if ($language_id === null) {
            $language_id = $multilingual->language_id;
        }
        /** @var ActiveRecord $owner */
        $owner = $this->owner;
        if ($language_id === $multilingual->language_id && !$owner->isRelationPopulated($this->translationRelation)) {
            $language_id = $multilingual->language_id;
            $translation = $owner->{$this->defaultTranslationRelation};
            if ($translation !== null) {
                return $translation;
            }
        } else {
            // language id specified and it's not default
            $translations = $owner->{$this->translationRelation};
            foreach ($translations as $item) {
                if ($item->language_id === $language_id) {
                    return $item;
                }
            }
        }
        // translation does not exists!

        /** @var ActiveRecord $class */
        $class = $this->getTranslationModelClassName();
        /** @var ActiveRecord $translation */
        $translation = new $class();
        $translation->loadDefaultValues();
        $translation->setAttribute('language_id', $language_id);

        $translations = $this->owner->{$this->translationRelation};
        $translations[] = $translation;

        $owner->populateRelation($this->translationRelation, $translations);


        if ($language_id === $multilingual->language_id) {
            $owner->populateRelation($this->defaultTranslationRelation, $translation);
        }

        return $translation;
    }
4096
private function getTranslationsForDomainAndIds($locale, $domain, $ids)
    {
        /** @var Translator $translator */
        $translator = $this->container->get('translator');

        $translations = [];
        foreach ($ids as $id) {
            $translations[$id] = $translator->trans($id, [], $domain, $locale);
        }

        return $translations;
    }
42606
public function getScriptID($id)
	{
		// normalize id
		$id = $this->getCanonicalID($id);
		// find sub tags
		if(($underscorePosition=strpos($id, '_'))!==false)
		{
			$subTag = explode('_', $id);
			// script sub tags can be distinguished from territory sub tags by length
			if (strlen($subTag[1])===4)
			{
				$id = $subTag[1];
			}
			else
			{
				$id = null;
			}
		}
		else
		{
			$id = null;
		}
		return $id;
	}
361175
public function getPage(int $uid, int $languageUid = null) {
    $page   = null;
    $record = $this->pageRepository->getPage($uid);

    if (is_array($record) && !empty($record)) {
      if (in_array($record['doktype'], self::PAGE_DOKTYPES)) {
        $page        = $record;
        $languageUid = isset($languageUid) ? $languageUid : $this->languageService->getLanguageUid();

        if ($languageUid > 0) {
          $page = $this->pageRepository->getPageOverlay($page, $languageUid);
        }
      }
    }

    return $page;
  }
1028430
public function getContentIds(array $remoteIds)
    {
        $objectRemoteIdMap = [];

        if (!empty($remoteIds)) {
            $query = $this->connection->createQueryBuilder();
            $query
                ->select(
                    $this->connection->quoteIdentifier('id'),
                    $this->connection->quoteIdentifier('remote_id')
                )
                ->from('ezcontentobject')
                ->where($query->expr()->in('remote_id', ':remoteIds'))
                ->setParameter(':remoteIds', $remoteIds, Connection::PARAM_STR_ARRAY)
            ;

            $statement = $query->execute();
            foreach ($statement->fetchAll(\PDO::FETCH_ASSOC) as $row) {
                $objectRemoteIdMap[$row['remote_id']] = $row['id'];
            }
        }

        return $objectRemoteIdMap;
    }
572548
public function loadModel($id, $language) 
	{
		$model = Message::model()->findByAttributes(array('id'=>$id, 'language'=>$language));
		if($model===null)
			throw new CHttpException(404, Yii::t('phrase', 'The requested page does not exist.'));
		return $model;
	}
186802
static public function fetchTagByUrl( $url, $language = false )
    {
        if ( $language )
        {
            if ( !is_array( $language ) )
                $language = array( $language );
            eZContentLanguage::setPrioritizedLanguages( $language );
        }

        $result = eZTagsObject::fetchByUrl( $url );

        if ( $language )
            eZContentLanguage::clearPrioritizedLanguages();

        if ( $result instanceof eZTagsObject )
            return array( 'result' => $result );

        return array( 'result' => false );
    }
1066402
public function getFields($id, $guestSpaceId = null, $lang = 'default'): array
    {
        $options = ['json' => ['app' => $id, 'lang' => $lang]];

        /** @var JsonStream $stream */
        $stream = $this->client
            ->get(KintoneApi::generateUrl('preview/app/form/fields.json', $guestSpaceId), $options)
            ->getBody();

        return $stream->jsonSerialize();
    }
1133746
public function getLanguageBySite($siteId)
    {
        if ($this->hasLanguageBySite($siteId)) {
            return $this->languageBySites[self::SITE_ID_PREFIX.$siteId];
        }

        return null;
    }
996027
static public function fetch( $tagID, $locale, $includeDrafts = false )
    {
        $fetchParams = array( 'keyword_id' => $tagID, 'locale' => $locale );
        if ( !$includeDrafts )
            $fetchParams['status'] = self::STATUS_PUBLISHED;

        return parent::fetchObject( self::definition(), null, $fetchParams );
    }