| @@ 21-34 (lines=14) @@ | ||
| 18 | return new \PlaygroundGame\Entity\PostVote; |
|
| 19 | } |
|
| 20 | ||
| 21 | public function getPath($post) |
|
| 22 | { |
|
| 23 | $path = $this->getOptions()->getMediaPath() . DIRECTORY_SEPARATOR; |
|
| 24 | $path .= 'game' . $post->getPostVote()->getId() . DIRECTORY_SEPARATOR; |
|
| 25 | if (!is_dir($path)) { |
|
| 26 | mkdir($path, 0777, true); |
|
| 27 | } |
|
| 28 | $path .= 'post'. $post->getId() . DIRECTORY_SEPARATOR; |
|
| 29 | if (!is_dir($path)) { |
|
| 30 | mkdir($path, 0777, true); |
|
| 31 | } |
|
| 32 | ||
| 33 | return $path; |
|
| 34 | } |
|
| 35 | ||
| 36 | public function getMediaUrl($post) |
|
| 37 | { |
|
| @@ 13-26 (lines=14) @@ | ||
| 10 | protected $tradingcardmodelMapper; |
|
| 11 | protected $tradingcardcardMapper; |
|
| 12 | ||
| 13 | public function getModelPath($model) |
|
| 14 | { |
|
| 15 | $path = $this->getOptions()->getMediaPath().DIRECTORY_SEPARATOR; |
|
| 16 | $path .= 'game'.$model->getGame()->getId().DIRECTORY_SEPARATOR; |
|
| 17 | if (!is_dir($path)) { |
|
| 18 | mkdir($path, 0777, true); |
|
| 19 | } |
|
| 20 | $path .= 'models'.DIRECTORY_SEPARATOR; |
|
| 21 | if (!is_dir($path)) { |
|
| 22 | mkdir($path, 0777, true); |
|
| 23 | } |
|
| 24 | ||
| 25 | return $path; |
|
| 26 | } |
|
| 27 | ||
| 28 | public function getModelMediaUrl($model) |
|
| 29 | { |
|
| @@ 73-86 (lines=14) @@ | ||
| 70 | return $this->event; |
|
| 71 | } |
|
| 72 | ||
| 73 | public function getGameUserPath($game, $user) |
|
| 74 | { |
|
| 75 | $path = $this->getOptions()->getMediaPath() . DIRECTORY_SEPARATOR; |
|
| 76 | $path .= 'game' . $game->getId() . DIRECTORY_SEPARATOR; |
|
| 77 | if (!is_dir($path)) { |
|
| 78 | mkdir($path, 0777, true); |
|
| 79 | } |
|
| 80 | $path .= 'user'. $user->getId() . DIRECTORY_SEPARATOR; |
|
| 81 | if (!is_dir($path)) { |
|
| 82 | mkdir($path, 0777, true); |
|
| 83 | } |
|
| 84 | ||
| 85 | return $path; |
|
| 86 | } |
|
| 87 | ||
| 88 | public function getGameUserMediaUrl($game, $user) |
|
| 89 | { |
|
| @@ 13-26 (lines=14) @@ | ||
| 10 | protected $memoryCardMapper; |
|
| 11 | protected $memoryScoreMapper; |
|
| 12 | ||
| 13 | public function getCardPath($card) |
|
| 14 | { |
|
| 15 | $path = $this->getOptions()->getMediaPath().DIRECTORY_SEPARATOR; |
|
| 16 | $path .= 'game'.$card->getGame()->getId().DIRECTORY_SEPARATOR; |
|
| 17 | if (!is_dir($path)) { |
|
| 18 | mkdir($path, 0777, true); |
|
| 19 | } |
|
| 20 | $path .= 'cards'.DIRECTORY_SEPARATOR; |
|
| 21 | if (!is_dir($path)) { |
|
| 22 | mkdir($path, 0777, true); |
|
| 23 | } |
|
| 24 | ||
| 25 | return $path; |
|
| 26 | } |
|
| 27 | ||
| 28 | public function getCardMediaUrl($card) |
|
| 29 | { |
|