Commit 1c43bd8c authored by Alexandre Zvenigorosky's avatar Alexandre Zvenigorosky
Browse files

Affichage des années

parent a97163f2
......@@ -54,6 +54,16 @@ class CcActivite implements HistoriqueAwareInterface
private $id;
/**
* Retourne la représentation littérale de cet objet.
*
* @return string
*/
public function __toString()
{
return $this->getLibelle();
}
/**
* Set code
......
......@@ -61,6 +61,13 @@ class CentreCout implements HistoriqueAwareInterface, ImportAwareInterface
*/
private $miseEnPaiement;
/**
* @var string
*/
private $uniteBudgetaire;
public function __construct()
......@@ -242,6 +249,32 @@ class CentreCout implements HistoriqueAwareInterface, ImportAwareInterface
return $this->typeHeures;
}
/**
* Set libelle
*
* @param string $uniteBudgetaire
*
* @return CentreCout
*/
public function setUniteBudgetaire($uniteBudgetaire)
{
$this->uniteBudgetaire = $uniteBudgetaire;
return $this;
}
/**
* Get libelle
*
* @return string
*/
public function getUniteBudgetaire()
{
return $this->uniteBudgetaire;
}
/**
......
......@@ -19,6 +19,7 @@
<field name="code" type="string" column="CODE" length="100" nullable="false"/>
<field name="libelle" type="string" column="LIBELLE" length="200" nullable="false"/>
<field name="sourceCode" type="string" column="SOURCE_CODE" length="100" nullable="false"/>
<field name="uniteBudgetaire" type="string" column="UNITE_BUDGETAIRE" length="15" nullable="true"/>
<many-to-one field="parent" target-entity="Application\Entity\Db\CentreCout">
<join-columns>
<join-column name="PARENT_ID" referenced-column-name="ID"/>
......
<?php
namespace Application\Service;
use Doctrine\ORM\QueryBuilder;
/**
* Description of FonctionReferentiel
*
* @author Laurent LÉCLUSE <laurent.lecluse at unicaen.fr>
*/
class CcActiviteService extends AbstractEntityService
{
/**
* retourne la classe des entités
*
* @return string
* @throws RuntimeException
*/
public function getEntityClass()
{
return \Application\Entity\Db\CcActivite::class;
}
/**
* Retourne l'alias d'entité courante
*
* @return string
*/
public function getAlias()
{
return 'ca';
}
public function getList(QueryBuilder $qb = null, $alias = null)
{
list($qb, $alias) = $this->initQuery();
$qb->addOrderBy("$alias.libelle");
return parent::getList($qb, $alias);
}
}
\ No newline at end of file
<?php
namespace Application\Service\Traits;
use Application\Service\CcActiviteService;
/**
* Description of CcActiviteAwareTrait
*
* @author UnicaenCode
*/
trait CcActiviteServiceAwareTrait
{
/**
* @var CcActiviteService
*/
private $serviceCcActivite;
/**
* @param CcActiviteService $serviceCcActivite
*
* @return self
*/
public function setServiceCcActivite(CcActiviteService $serviceCcActivite)
{
$this->serviceCcActivite = $serviceCcActivite;
return $this;
}
/**
* @return CcActiviteService
*/
public function getServiceCcActivite()
{
if (empty($this->serviceCcActivite)) {
$this->serviceCcActivite = \Application::$container->get(CcActiviteService::class);
}
return $this->serviceCcActivite;
}
}
\ No newline at end of file
......@@ -140,9 +140,9 @@ $nbCol = 6; ?>
<a class="btn btn-xs btn-primary ajax-modal" style="margin-top:0.5em; "
data-event="groupe-type-formation-saisie"
href="<?= $this->url('groupe-type-formation/type-formation-saisie', ['groupe-type-formation' => $fr->getId()]) ?>"
title="Ajouter une type de formation">
title="Ajouter un type de formation">
<span class="glyphicon glyphicon-edit"></span>
Ajouter un groupe de type de formation</a>
Ajouter un type de formation</a>
<?php endif ?>
</div>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment