| @@ 22-35 (lines=14) @@ | ||
| 19 | return new \PlaygroundGame\Entity\PostVote; |
|
| 20 | } |
|
| 21 | ||
| 22 | public function getPath($post) |
|
| 23 | { |
|
| 24 | $path = $this->getOptions()->getMediaPath() . DIRECTORY_SEPARATOR; |
|
| 25 | $path .= 'game' . $post->getPostVote()->getId() . DIRECTORY_SEPARATOR; |
|
| 26 | if (!is_dir($path)) { |
|
| 27 | mkdir($path, 0777, true); |
|
| 28 | } |
|
| 29 | $path .= 'post'. $post->getId() . DIRECTORY_SEPARATOR; |
|
| 30 | if (!is_dir($path)) { |
|
| 31 | mkdir($path, 0777, true); |
|
| 32 | } |
|
| 33 | ||
| 34 | return $path; |
|
| 35 | } |
|
| 36 | ||
| 37 | public function getMediaUrl($post) |
|
| 38 | { |
|
| @@ 15-28 (lines=14) @@ | ||
| 12 | protected $tradingcardmodelMapper; |
|
| 13 | protected $tradingcardcardMapper; |
|
| 14 | ||
| 15 | public function getPath($model) |
|
| 16 | { |
|
| 17 | $path = $this->getOptions()->getMediaPath() . DIRECTORY_SEPARATOR; |
|
| 18 | $path .= 'game' . $model->getGame()->getId() . DIRECTORY_SEPARATOR; |
|
| 19 | if (!is_dir($path)) { |
|
| 20 | mkdir($path, 0777, true); |
|
| 21 | } |
|
| 22 | $path .= 'model'. $model->getId() . DIRECTORY_SEPARATOR; |
|
| 23 | if (!is_dir($path)) { |
|
| 24 | mkdir($path, 0777, true); |
|
| 25 | } |
|
| 26 | ||
| 27 | return $path; |
|
| 28 | } |
|
| 29 | ||
| 30 | public function getMediaUrl($model) |
|
| 31 | { |
|