mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 05:44:58 +00:00
sf4 deprecated: migrate Doctrine ORM mapping to annotation
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2015, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -20,36 +19,60 @@
|
||||
|
||||
namespace Chill\ActivityBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
|
||||
/**
|
||||
* ActivityReasonCategory
|
||||
* Class ActivityReasonCategory
|
||||
*
|
||||
* @package Chill\ActivityBundle\Entity
|
||||
* @ORM\Entity()
|
||||
* @ORM\Table(null)
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
*/
|
||||
class ActivityReasonCategory
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Id
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="json_array")
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $active = true;
|
||||
|
||||
/** @var ArrayCollection array of ActivityReason */
|
||||
/**
|
||||
* Array of ActivityReason
|
||||
* @var ArrayCollection
|
||||
* @ORM\OneToMany(
|
||||
* targetEntity="Chill\ActivityBundle\Entity\ActivityReason",
|
||||
* mappedBy="category")
|
||||
*/
|
||||
private $reasons;
|
||||
|
||||
/**
|
||||
* ActivityReasonCategory constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->reasons = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return 'ActivityReasonCategory('.$this->getName('x').')';
|
||||
@@ -69,7 +92,6 @@ class ActivityReasonCategory
|
||||
* Set name
|
||||
*
|
||||
* @param array $name
|
||||
*
|
||||
* @return ActivityReasonCategory
|
||||
*/
|
||||
public function setName($name)
|
||||
|
Reference in New Issue
Block a user