예제 #1
0
 public function getTranslatedNameList()
 {
     if ($this->type) {
         switch ($this->type->key) {
             case 'main':
                 return Translator::translateToAll('app-weapon', $this->name);
             case 'sub':
                 return Translator::translateToAll('app-subweapon', $this->name);
             case 'special':
                 return Translator::translateToAll('app-special', $this->name);
         }
     }
     return Translator::translateToAll('app-death', $this->name);
 }
예제 #2
0
 public function toJsonArray(Gender $gender = null)
 {
     return ['key' => $this->key, 'name' => $gender === null ? Translator::translateToAll('app-fest', $this->name) : Translator::translateToAll('app-fest', $this->getFestTitleGenders()->andWhere(['gender_id' => $gender->id])->one()->name, ['***', '***'])];
 }
예제 #3
0
 public function toJsonArray()
 {
     return ['key' => $this->key, 'name' => Translator::translateToAll('app-subweapon', $this->name)];
 }
예제 #4
0
 public function toJsonArray()
 {
     return ['key' => strtolower($this->name), 'iso5218' => $this->id, 'name' => Translator::translateToAll('app', $this->name)];
 }
예제 #5
0
파일: Map.php 프로젝트: Bochozkar/stat.ink
 public function toJsonArray()
 {
     return ['key' => $this->key, 'name' => Translator::translateToAll('app-map', $this->name), 'area' => $this->area];
 }
예제 #6
0
 public function toJsonArray()
 {
     return ['key' => $this->key, 'type' => ['key' => $this->type->key, 'name' => Translator::translateToAll('app-weapon', $this->type->name)], 'name' => Translator::translateToAll('app-weapon', $this->name), 'sub' => $this->subweapon->toJsonArray(), 'special' => $this->special->toJsonArray()];
 }
예제 #7
0
 public function toJsonArray()
 {
     return ['key' => $this->key, 'name' => Translator::translateToAll('app-brand', $this->name), 'strength' => $this->strength ? $this->strength->toJsonArray() : null, 'weakness' => $this->weakness ? $this->weakness->toJsonArray() : null];
 }
예제 #8
0
 public function toJsonArray()
 {
     $t = $this->release_at ? strtotime($this->release_at) : null;
     return ['key' => $this->key, 'name' => Translator::translateToAll('app-map', $this->name), 'area' => $this->area, 'release_at' => $t ? DateTimeFormatter::unixTimeToJsonArray($t, new DateTimeZone('Etc/UTC')) : null];
 }
예제 #9
0
파일: Rule.php 프로젝트: Bochozkar/stat.ink
 public function toJsonArray()
 {
     return ['key' => $this->key, 'mode' => ['key' => $this->mode->key, 'name' => Translator::translateToAll('app-rule', $this->mode->name)], 'name' => Translator::translateToAll('app-rule', $this->name)];
 }
예제 #10
0
 public function toJsonArray()
 {
     return ['key' => $this->key, 'brand' => $this->brand ? $this->brand->toJsonArray() : null, 'name' => Translator::translateToAll('app-gear', $this->name), 'primary_ability' => $this->ability ? $this->ability->toJsonArray() : null];
 }