Skip to content

Instantly share code, notes, and snippets.

@doup
Created August 8, 2013 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doup/6184040 to your computer and use it in GitHub Desktop.
Save doup/6184040 to your computer and use it in GitHub Desktop.
<?php
namespace App\EventBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Illarra\ContentBundle\Entity\Image as BaseImage;
/**
* @ORM\Entity(repositoryClass="Illarra\ContentBundle\Repository\Image")
* @ORM\Table(name="event_image")
*/
class EventImage extends BaseImage
{
/**
* @return string
*/
public function getImageSubdir()
{
return 'event';
}
// ...
}
<?php
namespace Illarra\ContentBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\MappedSuperclass
* @ORM\HasLifecycleCallbacks
*/
class Image
{
use \Knp\DoctrineBehaviors\Model\Timestampable\Timestampable,
\Knp\DoctrineBehaviors\Model\Sortable\Sortable,
\Illarra\CoreBundle\Traits\Entity\Featured,
\Illarra\CoreBundle\Traits\Entity\Visible;
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment