Leaguepedia | League of Legends Esports Wiki
[checked revision][checked revision]
No edit summary
(Replaced content with "<includeonly>{{luadoc}}Category:Entities</includeonly>")
Tag: Replaced
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Luadoc}}<includeonly>[[Category:Switch Table Modules]]</includeonly>
+
<includeonly>{{luadoc}}[[Category:Entities]]</includeonly>
This module returns values from {{mod|Leaguenames}}, which defines variables for leagues. '''Unlike {{mod|Teamnames}}, none of the outputs is guaranteed to be globally unique.''' That is to say, while in {{mod|Teamnames}}, you are guaranteed that <code>|link=</code> is a unique identifier of a team, in this case there is no single output like that. Leagues can change logos across years, so league name and link are not unique; and two different leagues could use the same logo, so logo is not unique.
 
 
While one may consider <code><League>_<Year></code> as a candidate for unique identifier, the reality is that a league could change logo mid-season. If we were to use this syntax it would be at the cost of potentially a huge amount of technical debt.
 
 
Therefore, when storing league data it is advised to store a specific property just for calling this module.
 
 
FAQ:
 
 
'''Why is this a module and not a Cargo table?'''
 
:This way we don't have to use Cargo every single time when pulling a league image (for example in News). Also, if it were a Cargo table, on some level it would have to be "in between" {{ct|CCMLeagues}} and {{ct|Tournaments}} anyway: The former doesn't allow for changes in status across years, and the latter would be cumbersome to keep updated and also will not include as many entries as are needed for this table. Additionally, this table will need to be interacted with by users significantly more than the other two, since any image uploaded for a tournament to be listed in news will need to be added to this list.
 
 
'''So how does this work with {{ct|Tournaments}}?'''
 
:The value of <code>|LeagueIconKey=</code> given in that module is the league's unique key for this module. That table will store all of its metadata as well as the raw key input by the user, to preserve uniqueness.
 

Latest revision as of 03:59, 24 August 2020