mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-11 15:16:55 +03:00
Remove sonata pack
This commit is contained in:
committed by
Nicolas Grekas
parent
e421a69cc6
commit
67cafba71e
@@ -1,6 +0,0 @@
|
||||
sonata_media:
|
||||
class:
|
||||
media: App\Document\SonataMediaMedia
|
||||
gallery: App\Document\SonataMediaGallery
|
||||
gallery_has_media: App\Document\SonataMediaGalleryHasMedia
|
||||
db_driver: doctrine_mongodb
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Document;
|
||||
|
||||
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
|
||||
use JMS\Serializer\Annotation as Serializer;
|
||||
use Sonata\MediaBundle\Document\BaseGallery;
|
||||
|
||||
/**
|
||||
* @MongoDB\Document
|
||||
* @MongoDB\HasLifecycleCallbacks
|
||||
*/
|
||||
class SonataMediaGallery extends BaseGallery
|
||||
{
|
||||
/**
|
||||
* @MongoDB\Id()
|
||||
* @Serializer\Groups(groups={"sonata_api_read", "sonata_api_write", "sonata_search"})
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* @MongoDB\ReferenceMany(
|
||||
* targetDocument="App\Document\SonataMediaGalleryHasMedia",
|
||||
* mappedBy="gallery", cascade={"persist"}, orphanRemoval=false, sort={"position" = "ASC"}
|
||||
* )
|
||||
*/
|
||||
protected $galleryHasMedias;
|
||||
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @MongoDB\PrePersist
|
||||
*/
|
||||
public function prePersist(): void
|
||||
{
|
||||
parent::prePersist();
|
||||
}
|
||||
|
||||
/**
|
||||
* @MongoDB\PreUpdate
|
||||
*/
|
||||
public function preUpdate(): void
|
||||
{
|
||||
parent::preUpdate();
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Document;
|
||||
|
||||
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
|
||||
use JMS\Serializer\Annotation as Serializer;
|
||||
use Sonata\MediaBundle\Document\BaseGalleryHasMedia;
|
||||
|
||||
/**
|
||||
* @MongoDB\Document
|
||||
* @MongoDB\HasLifecycleCallbacks
|
||||
*/
|
||||
class SonataMediaGalleryHasMedia extends BaseGalleryHasMedia
|
||||
{
|
||||
/**
|
||||
* @MongoDB\Id()
|
||||
* @Serializer\Groups(groups={"sonata_api_read", "sonata_api_write", "sonata_search"})
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* @MongoDB\ReferenceOne(
|
||||
* targetDocument="App\Document\SonataMediaMedia",
|
||||
* inversedBy="galleryHasMedias", cascade={"persist"}
|
||||
* )
|
||||
*/
|
||||
protected $media;
|
||||
|
||||
/**
|
||||
* @MongoDB\ReferenceOne(
|
||||
* targetDocument="App\Document\SonataMediaGallery",
|
||||
* inversedBy="galleryHasMedias", cascade={"persist"}
|
||||
* )
|
||||
*/
|
||||
protected $gallery;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @MongoDB\PrePersist
|
||||
*/
|
||||
public function prePersist(): void
|
||||
{
|
||||
parent::prePersist();
|
||||
}
|
||||
|
||||
/**
|
||||
* @MongoDB\PreUpdate
|
||||
*/
|
||||
public function preUpdate(): void
|
||||
{
|
||||
parent::preUpdate();
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Document;
|
||||
|
||||
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
|
||||
use JMS\Serializer\Annotation as Serializer;
|
||||
use Sonata\MediaBundle\Document\BaseMedia;
|
||||
|
||||
/**
|
||||
* @MongoDB\Document
|
||||
* @MongoDB\HasLifecycleCallbacks
|
||||
*/
|
||||
class SonataMediaMedia extends BaseMedia
|
||||
{
|
||||
/**
|
||||
* @MongoDB\Id()
|
||||
* @Serializer\Groups(groups={"sonata_api_read", "sonata_api_write", "sonata_search"})
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* @MongoDB\ReferenceMany(
|
||||
* targetDocument="App\Document\SonataMediaGalleryHasMedia",
|
||||
* mappedBy="media", cascade={"persist"}, orphanRemoval=false, sort={"position" = "ASC"}
|
||||
* )
|
||||
*/
|
||||
protected $galleryHasMedias;
|
||||
|
||||
/**
|
||||
* @MongoDB\Field(type="string", nullable=true)
|
||||
*/
|
||||
protected $authorName;
|
||||
|
||||
/**
|
||||
* @MongoDB\Field(type="boolean", nullable=true)
|
||||
*/
|
||||
protected $cdnIsFlushable;
|
||||
|
||||
/**
|
||||
* @MongoDB\Field(type="string", nullable=true)
|
||||
*/
|
||||
protected $description;
|
||||
|
||||
/**
|
||||
* @MongoDB\Field(type="string", nullable=true)
|
||||
*/
|
||||
protected $copyright;
|
||||
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @MongoDB\PrePersist
|
||||
*/
|
||||
public function prePersist(): void
|
||||
{
|
||||
parent::prePersist();
|
||||
}
|
||||
|
||||
/**
|
||||
* @MongoDB\PreUpdate
|
||||
*/
|
||||
public function preUpdate(): void
|
||||
{
|
||||
parent::preUpdate();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
sonata_media:
|
||||
class:
|
||||
media: App\Entity\SonataMediaMedia
|
||||
gallery: App\Entity\SonataMediaGallery
|
||||
gallery_has_media: App\Entity\SonataMediaGalleryHasMedia
|
||||
category: App\Entity\SonataClassificationCategory
|
||||
db_driver: doctrine_orm
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
* If you are using <info>sonata-project/classification-bundle</>, fix annotations for
|
||||
<info>App\Entity\SonataMediaMedia::$category</>
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use JMS\Serializer\Annotation as Serializer;
|
||||
use Sonata\MediaBundle\Entity\BaseGallery;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="media__gallery")
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
class SonataMediaGallery extends BaseGallery
|
||||
{
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
* @Serializer\Groups(groups={"sonata_api_read", "sonata_api_write", "sonata_search"})
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(
|
||||
* targetEntity="App\Entity\SonataMediaGalleryHasMedia",
|
||||
* mappedBy="gallery", cascade={"persist"}, orphanRemoval=true
|
||||
* )
|
||||
* @ORM\OrderBy({"position"="ASC"})
|
||||
*
|
||||
* @var SonataMediaGalleryHasMedia[]
|
||||
*/
|
||||
protected $galleryHasMedias;
|
||||
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ORM\PrePersist
|
||||
*/
|
||||
public function prePersist(): void
|
||||
{
|
||||
parent::prePersist();
|
||||
}
|
||||
|
||||
/**
|
||||
* @ORM\PreUpdate
|
||||
*/
|
||||
public function preUpdate(): void
|
||||
{
|
||||
parent::preUpdate();
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use JMS\Serializer\Annotation as Serializer;
|
||||
use Sonata\MediaBundle\Entity\BaseGalleryHasMedia;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="media__gallery_media")
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
class SonataMediaGalleryHasMedia extends BaseGalleryHasMedia
|
||||
{
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
* @Serializer\Groups(groups={"sonata_api_read", "sonata_api_write", "sonata_search"})
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(
|
||||
* targetEntity="App\Entity\SonataMediaMedia",
|
||||
* inversedBy="galleryHasMedias", cascade={"persist"}
|
||||
* )
|
||||
* @ORM\JoinColumn(name="media_id", referencedColumnName="id", onDelete="CASCADE")
|
||||
*
|
||||
* @var SonataMediaMedia
|
||||
*/
|
||||
protected $media;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(
|
||||
* targetEntity="App\Entity\SonataMediaGallery",
|
||||
* inversedBy="galleryHasMedias", cascade={"persist"}
|
||||
* )
|
||||
* @ORM\JoinColumn(name="gallery_id", referencedColumnName="id", onDelete="CASCADE")
|
||||
*
|
||||
* @var SonataMediaGallery
|
||||
*/
|
||||
protected $gallery;
|
||||
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ORM\PrePersist
|
||||
*/
|
||||
public function prePersist(): void
|
||||
{
|
||||
parent::prePersist();
|
||||
}
|
||||
|
||||
/**
|
||||
* @ORM\PreUpdate
|
||||
*/
|
||||
public function preUpdate(): void
|
||||
{
|
||||
parent::preUpdate();
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use JMS\Serializer\Annotation as Serializer;
|
||||
use Sonata\MediaBundle\Entity\BaseMedia;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="media__media")
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
class SonataMediaMedia extends BaseMedia
|
||||
{
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
* @Serializer\Groups(groups={"sonata_api_read", "sonata_api_write", "sonata_search"})
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(
|
||||
* targetEntity="App\Entity\SonataMediaGalleryHasMedia",
|
||||
* mappedBy="media", cascade={"persist"}, orphanRemoval=false
|
||||
* )
|
||||
*
|
||||
* @var SonataMediaGalleryHasMedia[]
|
||||
*/
|
||||
protected $galleryHasMedias;
|
||||
|
||||
/**
|
||||
* Fix annotations if you use classification-bundle.
|
||||
*
|
||||
* // ORM\ManyToOne(
|
||||
* targetEntity="App\Entity\SonataClassificationCategory",
|
||||
* cascade={"persist"}
|
||||
* )
|
||||
* // ORM\JoinColumn(name="category_id", referencedColumnName="id", onDelete="SET NULL")
|
||||
*
|
||||
* @var SonataClassificationCategory
|
||||
*/
|
||||
protected $category;
|
||||
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ORM\PrePersist
|
||||
*/
|
||||
public function prePersist(): void
|
||||
{
|
||||
parent::prePersist();
|
||||
}
|
||||
|
||||
/**
|
||||
* @ORM\PreUpdate
|
||||
*/
|
||||
public function preUpdate(): void
|
||||
{
|
||||
parent::preUpdate();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
sonata_notification:
|
||||
backend: sonata.notification.backend.doctrine
|
||||
backends:
|
||||
doctrine: null
|
||||
class:
|
||||
message: App\Entity\SonataNotificationMessage
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use JMS\Serializer\Annotation as Serializer;
|
||||
use Sonata\NotificationBundle\Entity\BaseMessage;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="notification__message")
|
||||
*/
|
||||
class SonataNotificationMessage extends BaseMessage
|
||||
{
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
* // Serializer\Groups(groups={"sonata_api_read","sonata_api_write","sonata_search"})
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user