sf4 deprecated: migrate Doctrine ORM mapping to annotation

This commit is contained in:
2020-07-24 20:20:07 +02:00
parent c69d6d6bb8
commit 6ccfa8a130
8 changed files with 101 additions and 123 deletions

View File

@@ -20,21 +20,37 @@
namespace Chill\ActivityBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* ActivityType
* Class ActivityType
*
* @package Chill\ActivityBundle\Entity
* @ORM\Entity()
* @ORM\Table(null)
* @ORM\HasLifecycleCallbacks()
*/
class ActivityType
{
/**
* @var integer
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var array
* @ORM\Column(type="json_array")
*/
private $name;
/**
* @var bool
* @ORM\Column(type="boolean")
*/
private $active = true;
@@ -52,7 +68,6 @@ class ActivityType
* Set name
*
* @param array $name
*
* @return ActivityType
*/
public function setName($name)
@@ -86,34 +101,31 @@ class ActivityType
}
/**
* get active
*
* Get active
* return true if the type is active.
*
* @return boolean true if the type is active
* @return boolean
*/
public function getActive() {
return $this->active;
}
/**
* get active
*
* Is active
* return true if the type is active
*
* @return boolean true if the type is active
* @return boolean
*/
public function isActive() {
return $this->getActive();
}
/**
* set active
*
* Set active
* set to true if the type is active
*
* @param boolean $active
* @return \Chill\ActivityBundle\Entity\ActivityType
* @return ActivityType
*/
public function setActive($active) {
$this->active = $active;