aboutsummaryrefslogtreecommitdiff
path: root/src/model/Model.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-10-24 02:27:19 +0200
committerpolo <ordipolo@gmx.fr>2025-10-24 02:27:19 +0200
commit5311271ae590460b986e3e09edcdc665b73710ca (patch)
treef31f6b9602d1607e838a7a4bfe320db9c8d44bb4 /src/model/Model.php
parentf9a9bf1ae4fac9317fd71f0bcb207544b000e6f1 (diff)
downloadcms-5311271ae590460b986e3e09edcdc665b73710ca.zip
entité pour table intermédiaire à 3 champs entre NodeData et Asset, table Asset repensée
Diffstat (limited to 'src/model/Model.php')
-rw-r--r--src/model/Model.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/model/Model.php b/src/model/Model.php
index 16061e7..68c4c08 100644
--- a/src/model/Model.php
+++ b/src/model/Model.php
@@ -203,6 +203,17 @@ class Model
203 return true; 203 return true;
204 } 204 }
205 } 205 }
206 public function getWhatever(string $class, string $field, string $value): array
207 {
208 // penser au entityManager "repository"
209 $queryBuilder = $this->entityManager->createQueryBuilder();
210 $queryBuilder
211 ->select('n')
212 ->from($class, 'n')
213 ->where("n.$field = :value")
214 ->setParameter('value', $value);
215 return $queryBuilder->getQuery()->getResult();
216 }
206 217
207 // récupération d'un article pour modification 218 // récupération d'un article pour modification
208 public function makeArticleNode(string $id = '', bool $get_section = false): bool 219 public function makeArticleNode(string $id = '', bool $get_section = false): bool