<?php
namespace App\Entity;
/**
* ElementMesure.
*/
class ElementMesure
{
/**
* @var int
*/
private $id;
/**
* @var string
*/
private $code;
/**
* @var string
*/
private $titre;
/**
* @var string
*/
private $description;
/**
* @var int
*/
private $rang;
/**
* @var string
*/
private $cas;
/**
* @var int
*/
private $idBdOrigine;
/**
* @var \Doctrine\Common\Collections\Collection
*/
private $ValeursMesures;
/**
* @var \Doctrine\Common\Collections\Collection
*/
private $FamilleElementMesure;
/**
* Constructor.
*/
public function __construct()
{
$this->ValeursMesures = new \Doctrine\Common\Collections\ArrayCollection();
$this->FamilleElementMesure = new \Doctrine\Common\Collections\ArrayCollection();
}
public function __toString()
{
if (is_null($this->titre) or 0 == strlen($this->titre)) {
return '';
}
return $this->titre;
}
public function getNomComplet()
{
$cas = $this->getCas();
$unite = $this->getUnite();
$titre = $this->getTitre();
if ($cas) {
$titre .= " / $cas";
}
if ($unite) {
$titre .= " ($unite)";
}
return $titre;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set code.
*
* @param string $code
*
* @return ElementMesure
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Get code.
*
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* Set titre.
*
* @param string $titre
*
* @return ElementMesure
*/
public function setTitre($titre)
{
$this->titre = $titre;
return $this;
}
/**
* Get titre.
*
* @return string
*/
public function getTitre()
{
return $this->titre;
}
/**
* Set description.
*
* @param string $description
*
* @return ElementMesure
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description.
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set rang.
*
* @param int $rang
*
* @return ElementMesure
*/
public function setRang($rang)
{
$this->rang = $rang;
return $this;
}
/**
* Get rang.
*
* @return int
*/
public function getRang()
{
return $this->rang;
}
/**
* Set cas.
*
* @param string $cas
*
* @return ElementMesure
*/
public function setCas($cas)
{
$this->cas = $cas;
return $this;
}
/**
* Get cas.
*
* @return string
*/
public function getCas()
{
return $this->cas;
}
/**
* Set idBdOrigine.
*
* @param int $idBdOrigine
*
* @return ElementMesure
*/
public function setIdBdOrigine($idBdOrigine)
{
$this->idBdOrigine = $idBdOrigine;
return $this;
}
/**
* Get idBdOrigine.
*
* @return int
*/
public function getIdBdOrigine()
{
return $this->idBdOrigine;
}
/**
* Add valeursMesure.
*
* @param \App\Entity\ValeursMesures $valeursMesure
*
* @return ElementMesure
*/
public function addValeursMesure(ValeursMesures $valeursMesure)
{
$this->ValeursMesures[] = $valeursMesure;
return $this;
}
/**
* Remove valeursMesure.
*
* @param \App\Entity\ValeursMesures $valeursMesure
*/
public function removeValeursMesure(ValeursMesures $valeursMesure)
{
$this->ValeursMesures->removeElement($valeursMesure);
}
/**
* Get valeursMesures.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getValeursMesures()
{
return $this->ValeursMesures;
}
/**
* Add familleElementMesure.
*
* @param \App\Entity\FamilleElementMesure $familleElementMesure
*
* @return ElementMesure
*/
public function addFamilleElementMesure(FamilleElementMesure $familleElementMesure)
{
$this->FamilleElementMesure[] = $familleElementMesure;
return $this;
}
/**
* Remove familleElementMesure.
*
* @param \App\Entity\FamilleElementMesure $familleElementMesure
*/
public function removeFamilleElementMesure(FamilleElementMesure $familleElementMesure)
{
$this->FamilleElementMesure->removeElement($familleElementMesure);
}
/**
* Get familleElementMesure.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getFamilleElementMesure()
{
return $this->FamilleElementMesure;
}
/**
* @var string
*/
private $unite;
/**
* Set unite.
*
* @param string $unite
*
* @return ElementMesure
*/
public function setUnite($unite)
{
$this->unite = $unite;
return $this;
}
/**
* Get unite.
*
* @return string
*/
public function getUnite()
{
return $this->unite;
}
}