Get a champion by its id.

@param int $championId
@return ChampionMastery|null
540054
public function getChampion($championId)
    {
        foreach($this->info as $mastery) {
            if($mastery->championId == $championId)
                return $mastery;
        }
        return null;
    }
455531
public function getCustomer($customerId)
    {
        $requestData = new Get\RequestData();
        $requestData->setCustomerId($customerId);

        $customers = $this->getCustomers($requestData)->getResponse()->getCustomers();

        return isset($customers[0]) ? $customers[0] : null;
    }
627068
protected function getBannersByCatID($CatID = 0)
    {
        $arrBanners = array();
        
        if ($CatID == -1)
        { // all Categories
            $objBanners = \Database::getInstance()
                            ->prepare("SELECT 
                                            tb.id
                                          , tb.banner_type
                                          , tb.banner_name
                                          , tb.banner_url
                                          , tb.banner_jumpTo
                                          , tb.banner_image
                                          , tb.banner_image_extern
                                          , tb.banner_weighting
                                          , tb.banner_start
                                          , tb.banner_stop
                                          , tb.banner_published
                                          , tb.banner_until
                                          , tb.banner_comment
                                          , tb.banner_views_until
                                          , tb.banner_clicks_until
                                          , tbs.banner_views
                                          , tbs.banner_clicks
                                       FROM 
                                            tl_banner tb
                                          , tl_banner_stat tbs
                                       WHERE 
                                            tb.id=tbs.id
                                       ORDER BY 
                                            tb.pid
                                          , tb.sorting")
                            ->execute();
        }
        else
        {
            $objBanners = \Database::getInstance()
                            ->prepare("SELECT
                                            tb.id
                                          , tb.banner_type
                                          , tb.banner_name
                                          , tb.banner_url
                                          , tb.banner_jumpTo
                                          , tb.banner_image
                                          , tb.banner_image_extern
                                          , tb.banner_weighting
                                          , tb.banner_start
                                          , tb.banner_stop
                                          , tb.banner_published
                                          , tb.banner_until
                                          , tb.banner_comment
                                          , tb.banner_views_until
                                          , tb.banner_clicks_until
                                          , tbs.banner_views
                                          , tbs.banner_clicks
                                       FROM
                                            tl_banner tb
                                          , tl_banner_stat tbs
                                       WHERE
                                            tb.id=tbs.id
                                       AND
                                            tb.pid =?
                                       ORDER BY
                                            tb.sorting")
                            ->execute($CatID);
        }
        $intRows = $objBanners->numRows;
        if ($intRows > 0)
        {
            while ($objBanners->next())
            {
                $arrBanners[] = array('id'                  => $objBanners->id
                                    , 'banner_type'         => $objBanners->banner_type
                                    , 'banner_name'         => $objBanners->banner_name
                                    , 'banner_url'          => $objBanners->banner_url
                                    , 'banner_jumpTo'       => $objBanners->banner_jumpTo
                                    , 'banner_image'        => $objBanners->banner_image
                                    , 'banner_image_extern' => $objBanners->banner_image_extern
                                    , 'banner_weighting'    => $objBanners->banner_weighting
                                    , 'banner_start'        => $objBanners->banner_start
                                    , 'banner_stop'         => $objBanners->banner_stop
                                    , 'banner_published'    => $objBanners->banner_published
                                    , 'banner_until'        => $objBanners->banner_until
                                    , 'banner_comment'      => $objBanners->banner_comment
                                    , 'banner_views_until'  => $objBanners->banner_views_until
                                    , 'banner_clicks_until' => $objBanners->banner_clicks_until
                                    , 'banner_views'        => $objBanners->banner_views
                                    , 'banner_clicks'       => $objBanners->banner_clicks                        
                                     );
            } // while
        }
        
        return $arrBanners;
    }
458291
public function getCommandClass($commandID)
    {
        if (isset($this->commands[$commandID = strtoupper($commandID)])) {
            return $this->commands[$commandID];
        }
    }
534899
public function getBuilderById(string $builderId)
    {
        if (array_key_exists($builderId, $this->builders)) {
            return $this->builders[$builderId];
        }

        return;
    }
1217136
public function ban($banId)
	{
		if ( ! isset($this->info['bans']))
		{
			// no teams
			return null;
		}
		$bans = $this->info['bans'];
		if (isset($bans[$banId]))
		{
			return $bans[$banId];
		}

		return null;
	}
1078516
private function getFolderById(int $folderId): \stdClass
    {
        $folder = Craft::$app->assets->getFolderById($folderId);
        if ($folder) {
            $volume = $folder->getVolume();
            return  (object) [
                'id' => $folderId,
                'handle' => $volume->handle
            ];
        }
        return null;
    }
653260
public function getTokenStatusLinkForTokenId($tokenId)
    {
        $token = $tokenId ? $this->loader->getTracker()->getToken($tokenId) : null;

        if (! ($tokenId && $token->exists)) {
            return $this->getStatusIcon('D');
        }

        return $this->getTokenStatusLink(
                $tokenId, $token->getStatusCode(),
                $token->getPatientNumber(), $token->getRoundDescription(),
                $token->getSurveyName(), $token->getResult()
                );
    }
796029
public static function get($id){
		if( isset(self::$instances[$id]) ){
			return self::$instances[$id];
		}
		return null;
	}
1108241
public static function getChampionIconO( StaticChampionDto $champion, array $attributes = [] ): Html
	{
		return self::getChampionIcon($champion->id, $attributes);
	}
537924
public function findByRoleId($roleId)
    {
        $select = $this->getSelect($this->getUserTableName());
        $select->where(array($this->getTableName() . '.role_id' => $roleId));
        $select->join(
            $this->getTableName(),
            $this->getTableName(). '.user_id = ' . $this->getUserTableName(). '.user_id',
            array(),
            Select::JOIN_INNER
        );
        $select->group($this->getUserTableName(). '.user_id');

        $entityPrototype = $this->getZfcUserOptions()->getUserEntityClass();

        return $this->select($select, new $entityPrototype, $this->getZfcUserHydrator());
    }
1113078
public function get_competency($competencyid) {
        $competency = null;

        if ($this->get('status') == self::STATUS_COMPLETE) {
            // Get the competency from the archive of the plan.
            $competency = user_competency_plan::get_competency_by_planid($this->get('id'), $competencyid);
        } else if ($this->is_based_on_template()) {
            // Get the competency from the template.
            $competency = template_competency::get_competency($this->get('templateid'), $competencyid);
        } else {
            // Get the competency from the plan.
            $competency = plan_competency::get_competency($this->get('id'), $competencyid);
        }
        return $competency;
    }
466629
public function getMastery($masteryId)
	{
		if (isset($this->info['data'][$masteryId]))
		{
			return $this->info['data'][$masteryId];
		}

		return null;
	}
298248
public function findOne($productId)
    {
        $this->useAlternateEndpoint = true;
        $this->queryParams['ProductIds'] = $productId;
        $this->addAllProductImages();
        $this->addAllShopLogos();
        $response = $this->send();
        $products = $response->getProducts();
        if (isset($products[0])) {
            return $products[0];
        }

        return null;
    }
980168
public static function getByID($cID, $cvID = 'RECENT')
    {
        $c = parent::getByID($cID, $cvID);

        if (static::isValidStack($c)) {
            return $c;
        }

        return null;
    }
1252169
public function game($gameId)
	{
		if ( ! isset($this->info['games'][$gameId]))
		{
			return null;
		}

		return $this->info['games'][$gameId];
	}
309608
public function championById($championId)
	{
		$info = $this->request('champion/'.$championId);

		return $this->attachStaticDataToDto(new Champ($info));
	}