Created
December 27, 2021 09:01
-
-
Save HongKilDong/44e06af2dd00c056a03d8a0a94c3daa3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Entity\Blog; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* App\Entity\Blog\Article | |
* | |
* @ORM\Entity | |
* @ORM\Table(name="blog_article") | |
*/ | |
class Article extends \Odiseo\SyliusBlogPlugin\Entity\Article | |
{ | |
/** | |
* @ORM\Column(name="cover_image_id") | |
* @ORM\OneToOne(targetEntity=ArticleCoverImage::class, inversedBy="owner", cascade={"all"}) | |
* @ORM\JoinColumn(name="cover_image_id", nullable=true) | |
*/ | |
private $coverImage; | |
public function getCoverImage(): ?ArticleCoverImage | |
{ | |
return $this->coverImage; | |
} | |
public function setCoverImage(ArticleCoverImage $coverImage): self | |
{ | |
$this->coverImage = $coverImage; | |
return $this; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment