示例#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
 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
 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];
 }