29 lines
454 B
PHP
29 lines
454 B
PHP
<?php
|
|
|
|
namespace App\Gmarche\Entity;
|
|
|
|
class Region
|
|
{
|
|
|
|
public $id;
|
|
|
|
public $name;
|
|
|
|
public $slug;
|
|
|
|
public $codeIso;
|
|
|
|
public $image;
|
|
|
|
public function getThumb()
|
|
{
|
|
['filename' => $filename, 'extension' => $extension] = pathinfo($this->image);
|
|
return '/uploads/regions/' . $filename . '_thumb.' . $extension;
|
|
}
|
|
|
|
public function getImageUrl()
|
|
{
|
|
return '/uploads/regions/' . $this->image;
|
|
}
|
|
}
|