mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Bootstrap encoder for documents
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -23,12 +23,11 @@ namespace Chill\MainBundle\Entity;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="centers")
|
||||
*
|
||||
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
||||
*/
|
||||
class Center implements HasCenterInterface
|
||||
{
|
||||
@@ -46,9 +45,10 @@ class Center implements HasCenterInterface
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="string", length=255)
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*/
|
||||
private $name;
|
||||
|
||||
private string $name = '';
|
||||
|
||||
/**
|
||||
* @var Collection
|
||||
*
|
||||
@@ -58,8 +58,8 @@ class Center implements HasCenterInterface
|
||||
* )
|
||||
*/
|
||||
private $groupCenters;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Center constructor.
|
||||
*/
|
||||
@@ -67,7 +67,7 @@ class Center implements HasCenterInterface
|
||||
{
|
||||
$this->groupCenters = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
@@ -75,7 +75,7 @@ class Center implements HasCenterInterface
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @return $this
|
||||
@@ -85,7 +85,7 @@ class Center implements HasCenterInterface
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
@@ -93,7 +93,7 @@ class Center implements HasCenterInterface
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return ArrayCollection|Collection
|
||||
*/
|
||||
@@ -101,7 +101,7 @@ class Center implements HasCenterInterface
|
||||
{
|
||||
return $this->groupCenters;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param GroupCenter $groupCenter
|
||||
* @return $this
|
||||
@@ -111,7 +111,7 @@ class Center implements HasCenterInterface
|
||||
$this->groupCenters->add($groupCenter);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
@@ -119,7 +119,7 @@ class Center implements HasCenterInterface
|
||||
{
|
||||
return $this->getName();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return $this|Center
|
||||
*/
|
||||
|
@@ -8,7 +8,7 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Chill\MainBundle\Entity\UserJob;
|
||||
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
* User
|
||||
@@ -16,7 +16,7 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="users")
|
||||
* @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="acl_cache_region")
|
||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "user"=User::class
|
||||
* })
|
||||
*/
|
||||
@@ -51,6 +51,7 @@ class User implements AdvancedUserInterface {
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=200)
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*/
|
||||
private string $label = '';
|
||||
|
||||
@@ -58,8 +59,9 @@ class User implements AdvancedUserInterface {
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="string", length=150, nullable=true)
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*/
|
||||
private $email;
|
||||
private ?string $email = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
@@ -123,6 +125,7 @@ class User implements AdvancedUserInterface {
|
||||
/**
|
||||
* @var Center|null
|
||||
* @ORM\ManyToOne(targetEntity=Center::class)
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*/
|
||||
private ?Center $mainCenter = null;
|
||||
|
||||
|
Reference in New Issue
Block a user