Get menu item by id

@param   string  $language  The language code.
@return  mixed   The item object
8189
public function getDefault($language = '*')
	{
		if (array_key_exists($language, $this->_default) && $this->get('language_filter'))
		{
			return $this->_items[$this->_default[$language]];
		}

		if (array_key_exists('*', $this->_default))
		{
			return $this->_items[$this->_default['*']];
		}

		return 0;
	}
1276395
public function get($id)
    {
        if (!$this->has($id)) {
            return;
        }

        return $this->container->findDefinition($id)->getClass();
    }
590268
public function get($id)
    {
        foreach ($this->items as $item) {
            if ($item->id === $id) {
                return $item;
            }
        }
        return null;
    }
401657
public function getItem($id)
	{
		$result = null;

		if (isset($this->_items[$id]))
		{
			$result =& $this->_items[$id];
		}

		return $result;
	}
66392
static public function fetchTag( $tagID, $language = false )
    {
        if ( $language )
        {
            if ( !is_array( $language ) )
                $language = array( $language );
            eZContentLanguage::setPrioritizedLanguages( $language );
        }

        $result = false;
        if ( is_numeric( $tagID ) )
        {
            $result = eZTagsObject::fetch( $tagID );
        }
        else if ( is_array( $tagID ) && !empty( $tagID ) )
        {
            $result = eZTagsObject::fetchList( array( 'id' => array( $tagID ) ) );
        }

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

        if ( $result instanceof eZTagsObject || ( is_array( $result ) && !empty( $result ) ) )
            return array( 'result' => $result );

        return array( 'result' => false );
    }
1246851
public function itemGet($id) {
		$list = $this->itemsGet(array($id));
		$item = reset($list);
		return $item;
	}
968962
public function getLanguage(int $identifier): Language
    {
        $json = $this->parent->performAPICallWithJsonResponse('get', sprintf('/languages/%d', $identifier));
        return DataParser::parseData($json, Language::class);
    }
1117327
static function fetch( $id )
    {
        $languages = eZContentLanguage::fetchList();

        return isset( $languages[$id] )? $languages[$id]: false;
    }
1105289
public function getTranslation($languageId = null)
    {
        $languageId = request()->get('language_id');
        if (null === $languageId) {
            return $this;
        } else {
            return $this->translations()->whereLanguageId($languageId)->first();
        }  
    }
1113858
public static function get_menu_item($code)
    {
        $menuItems = self::get_menu_items();
        return (isset($menuItems[$code])) ? $menuItems[$code] : false;
    }
310420
public function language($language = null) {
		$this->getRequest()->allowMethod(['post']);

		$allowedLanguages = (array)Configure::read('Config.allowedLanguages');
		if (!$language) {
			$language = Configure::read('Config.defaultLanguage');
		}
		if (!$language) {
			$keys = array_keys($allowedLanguages);
			$language = $allowedLanguages[array_shift($keys)];
		}

		if (!array_key_exists($language, $allowedLanguages)) {
			throw new RuntimeException('Invalid Language');
		}
		$language = $allowedLanguages[$language];

		$this->getRequest()->getSession()->write('Config.language', $language['locale']);
		I18n::setLocale($language['locale']);
		$this->Flash->success(__d('tools', 'Language switched to {0}', $language['name']));
		return $this->redirect($this->referer('/', true));
	}
1197943
public function getTitle($language = null)
    {
        if (!isset($this->titles[$language])) {
            return current($this->titles);
        }

        return $this->titles[$language];
    }
526734
protected function indexItem(Item $item, $language = 0)
    {
        $itemIndexed = false;
        $documents = [];

        $itemDocument = $this->itemToDocument($item, $language);
        if (is_null($itemDocument)) {
            /*
             * If there is no itemDocument, this means there was no translation
             * for this record. This should not stop the current item to count as
             * being valid because not-indexing not-translated items is perfectly
             * fine.
             */
            return true;
        }

        $documents[] = $itemDocument;
        $documents = array_merge($documents, $this->getAdditionalDocuments($item, $language, $itemDocument));
        $documents = $this->processDocuments($item, $documents);
        $documents = $this->preAddModifyDocuments($item, $language, $documents);

        try {
            $response = $this->solr->getWriteService()->addDocuments($documents);
            if ($response->getHttpStatus() == 200) {
                $itemIndexed = true;
            }
        } catch (HttpException $e) {
            $response = new ResponseAdapter($e->getBody(), $httpStatus = 500, $e->getStatusMessage());
        }

        $this->log($item, $documents, $response);

        return $itemIndexed;
    }
1211527
public function intlFormatter($language = null)
    {
        if ($language === null) {
            $language = \Yii::$app->language;
        }

        if (isset(self::$lanquages[$language])) {
            return self::$lanquages[$language];
        }

        $formatter = new \skeeks\modules\cms\money\IntlFormatter($language);

        self::$lanquages[$language] = $formatter;
        return $formatter;
    }
233309
public function translationsAction($language)
    {
        $language = $this->getUser()->getInterfaceLanguage($language);

        $translations = $this->get('resourcesTranslations');
        $content = $translations->get($language);

        return new Response($content, 200, ['Content-Type' => 'text/javascript']);
    }
387785
public function get($id)
    {
        if (false === $this->has($id)) {
            throw new \RuntimeException(sprintf('Item with id: "%s" not found.', $id));
        }

        return $this->items[$id];
    }
177878
public function withLanguage(string $language): self
    {
        $provider = clone $this;

        $provider->language = $this->getLanguage($language);

        return $provider;
    }