Group FEWO | Upload Image FEWO | POS

Gruppen für die FEWO
Upload Images bei den Gruppen + vor und nach
Pos Sortierungen bei den Images
Einbau in den Frontend
Silder Bilder zuweisen  pre + page + post

git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3367 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
adametz 2018-02-03 20:36:35 +00:00
parent ff986cd437
commit 1293c19bc6
25 changed files with 1249 additions and 37 deletions

View file

@ -33,6 +33,16 @@ class FewoLodging
private $name;
/**
* @var \AppBundle\Entity\FewoLodgingGroup
*
* @ORM\ManyToOne(targetEntity="FewoLodgingGroup")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="group_id", referencedColumnName="id")
* })
*/
private $group;
/**
* @var \AppBundle\Entity\FewoLodgingType
*
* @ORM\ManyToOne(targetEntity="FewoLodgingType")
@ -119,6 +129,7 @@ class FewoLodging
/**
* @ORM\OneToMany(targetEntity="FewoLodgingImage", mappedBy="lodging", cascade={"persist", "remove"})
* @ORM\OrderBy({"pos" = "ASC"})
*/
private $images;
@ -428,6 +439,31 @@ class FewoLodging
return $this->calendarVisible;
}
/**
* Set type
*
* @param \AppBundle\Entity\FewoLodgingGroup $group
*
* @return FewoLodging
*/
public function setGroup(\AppBundle\Entity\FewoLodgingGroup $group = null)
{
$this->group = $group;
return $this;
}
/**
* Get type
*
* @return \AppBundle\Entity\FewoLodgingGroup
*/
public function getGroup()
{
return $this->group;
}
/**
* Set type
*

View file

@ -0,0 +1,141 @@
<?php
namespace AppBundle\Entity;
use AppBundle\AppBundle;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table
* @ORM\Entity
*/
class FewoLodgingGroup
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255, nullable=true)
*/
private $name;
/**
* @ORM\OneToMany(targetEntity="FewoLodging", mappedBy="group", cascade={"persist", "remove"})
*/
private $lodgings;
//------------------------------------------------------------------------------------------------------------------
// Bilder
/**
* @ORM\OneToMany(targetEntity="FewoLodgingGroupImage", mappedBy="lodgingGroup", cascade={"persist", "remove"})
* @ORM\OrderBy({"pos" = "ASC"})
*/
private $images;
/**
* Constructor
*/
public function __construct()
{
$this->images = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Get lodgings
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getLodgings()
{
return $this->lodgings;
}
/**
* Add image
*
* @param \AppBundle\Entity\FewoLodgingGroupImage $image
*
* @return FewoLodging
*/
public function addImage(\AppBundle\Entity\FewoLodgingGroupImage $image)
{
$this->images[] = $image;
return $this;
}
/**
* Remove image
*
* @param \AppBundle\Entity\FewoLodgingGroupImage $image
*/
public function removeImage(\AppBundle\Entity\FewoLodgingGroupImage $image)
{
$this->images->removeElement($image);
}
/**
* Get images
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getImages()
{
return $this->images;
}
/**
* Set name
*
* @param string $name
*
* @return FewoLodgingType
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
function __toString()
{
return $this->name;
}
}

View file

@ -0,0 +1,234 @@
<?php
namespace AppBundle\Entity;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table
* @ORM\Entity
*/
class FewoLodgingGroupImage
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="full_file_name", type="string", length=255, nullable=false)
* @Assert\Image(maxSize="15000000", mimeTypes={"image/jpeg", "image/png"})
*/
private $file;
/**
* @var string
*
* @ORM\Column(name="file_name", type="string", length=255, nullable=false)
* @Assert\NotBlank
*/
private $fileName;
/**
* @var string
*
* @ORM\Column(name="comp", type="string", length=4, nullable=true)
* @Assert\NotBlank
*/
private $comp;
/**
* @var string
*
* @ORM\Column(name="pos", type="integer", nullable=false)
* @Assert\NotBlank
*/
private $pos;
/**
* @var string
*
* @ORM\Column(name="description", type="string", length=255, nullable=true)
*/
private $description;
/**
* @var \AppBundle\Entity\FewoLodgingGroup
*
* @ORM\ManyToOne(targetEntity="FewoLodgingGroup", inversedBy="images")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="group_id", referencedColumnName="id", onDelete="SET NULL")
* })
*/
private $lodgingGroup;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set file
*
* @param string $file
*
* @return FewoLodgingGroupImage
*/
public function setFile($file)
{
$this->file = $file;
return $this;
}
/**
* Get file
*
* @return string
*/
public function getFile()
{
return $this->file;
}
/**
* Set description
*
* @param string $description
*
* @return FewoLodgingGroupImage
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set comp
*
* @param string $comp
*
* @return FewoLodgingGroupImage
*/
public function setComp($comp)
{
$this->comp = $comp;
return $this;
}
/**
* Get comp
*
* @return string
*/
public function getComp()
{
return $this->comp;
}
/**
* Set pos
*
* @param string $pos
*
* @return FewoLodgingGroupImage
*/
public function setPos($pos)
{
$this->pos = $pos;
return $this;
}
/**
* Get pos
*
* @return string
*/
public function getPos()
{
return $this->pos;
}
/**
* Set lodgingGroup
*
* @param \AppBundle\Entity\FewoLodgingGroup $lodgingGroup
*
* @return FewoLodgingGroupImage
*/
public function setLodgingGroup(\AppBundle\Entity\FewoLodgingGroup $lodgingGroup = null)
{
$this->lodgingGroup = $lodgingGroup;
return $this;
}
/**
* Get lodgingGroup
*
* @return \AppBundle\Entity\FewoLodgingGroup
*/
public function getLodgingGroup()
{
return $this->lodgingGroup;
}
function __toString()
{
return $this->file;
}
/**
* Set fileName
*
* @param string $fileName
*
* @return FewoLodgingGroupImage
*/
public function setFileName($fileName)
{
$this->fileName = $fileName;
return $this;
}
/**
* Get fileName
*
* @return string
*/
public function getFileName()
{
return $this->fileName;
}
}

View file

@ -36,6 +36,14 @@ class FewoLodgingImage
*/
private $fileName;
/**
* @var string
*
* @ORM\Column(name="pos", type="integer", nullable=false)
* @Assert\NotBlank
*/
private $pos;
/**
* @var string
*
@ -88,6 +96,31 @@ class FewoLodgingImage
return $this->file;
}
/**
* Set pos
*
* @param string $pos
*
* @return FewoLodgingImage
*/
public function setPos($pos)
{
$this->pos = $pos;
return $this;
}
/**
* Get pos
*
* @return string
*/
public function getPos()
{
return $this->pos;
}
/**
* Set description
*