mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
add base configuration for user
This commit is contained in:
parent
4042e7445f
commit
33465a3490
20
DependencyInjection/MissingBundleException.php
Normal file
20
DependencyInjection/MissingBundleException.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace CL\Chill\MainBundle\DependencyInjection;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description of MissingBundleException
|
||||||
|
*
|
||||||
|
* @author julien
|
||||||
|
*/
|
||||||
|
class MissingBundleException extends Exception {
|
||||||
|
|
||||||
|
public function __construct($missingBundleName) {
|
||||||
|
$message = "The bundle $missingBundleName is missing.";
|
||||||
|
|
||||||
|
parent::__construct($message, 500);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
64
Entity/Agent.php
Normal file
64
Entity/Agent.php
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace CL\Chill\MainBundle\Entity;
|
||||||
|
|
||||||
|
use FOS\UserBundle\Entity\User as BaseUser;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Agent
|
||||||
|
*/
|
||||||
|
class Agent extends BaseUser {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
protected $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id
|
||||||
|
*
|
||||||
|
* @return integer
|
||||||
|
*/
|
||||||
|
public function getId()
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set name
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
* @return Agent
|
||||||
|
*/
|
||||||
|
public function setName($name)
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __toString() {
|
||||||
|
parent::__toString();
|
||||||
|
}
|
||||||
|
}
|
14
Resources/config/doctrine/Agent.orm.yml
Normal file
14
Resources/config/doctrine/Agent.orm.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
CL\Chill\MainBundle\Entity\Agent:
|
||||||
|
type: entity
|
||||||
|
table: agents
|
||||||
|
id:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
id: true
|
||||||
|
generator:
|
||||||
|
strategy: AUTO
|
||||||
|
fields:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
length: 80
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user