Commit 79edaaaf authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Récup de l'ID de plafond pour les contrôles

parent 4128c0e6
Loading
Loading
Loading
Loading
+32 −2
Changes for module/Plafond/src/Entity/PlafondControle.php: 32 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -2,8 +2,6 @@

namespace Plafond\Entity;

use Plafond\Controller\PlafondController;

/**
 * Description of PlafondControle
 *
@@ -11,6 +9,11 @@ use Plafond\Controller\PlafondController;
 */
class PlafondControle
{
    /**
     * @var int
     */
    private $id;

    /**
     * @var string
     */
@@ -63,6 +66,30 @@ class PlafondControle



    /**
     * @return int
     */
    public function getId(): int
    {
        return $this->id;
    }



    /**
     * @param int $id
     *
     * @return PlafondControle
     */
    public function setId(int $id): PlafondControle
    {
        $this->id = $id;

        return $this;
    }



    /**
     * @return string
     */
@@ -326,6 +353,9 @@ class PlafondControle
    public static function fromArray(array $a): PlafondControle
    {
        $pc = new PlafondControle();
        if (isset($a['ID'])) {
            $pc->setId((int)$a['ID']);
        }
        if (isset($a['CODE'])) {
            $pc->setCode($a['CODE']);
        }
+1
Changes for module/Plafond/src/Service/PlafondService.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ class PlafondService extends AbstractEntityService

        $sql = "
            SELECT
              p.id           id,
              p.code         code,
              p.libelle      libelle,
              p.libelle      message,