![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 236 Pomógł: 0 Dołączył: 27.10.2012 Ostrzeżenie: (0%) ![]() ![]() |
hej
próbuje zrobić mapowanie dla trzech tabel: posts / tabela przechowująca newsy itp ----------- id title slug content dateAdd menu / tabela z kategoriami - każdy news może być przyporządkowany do kilku kategorii ----------- id parentId category_name slug connector / tabela łącząca rekordy z tabel: posts i menu ------------- id menuId postId Post.php
Connector.php
w kontrolerze mam:
w twigu mam:
no i to mapowanie działa, np.: jak usune posta to usuwa mi również jego kategorie z tabeli connector. ale za piernika nie wiem jak w tej pętli wyświetlić jeszcze informacje z tabeli posts (IMG:style_emoticons/default/questionmark.gif) (IMG:style_emoticons/default/questionmark.gif) . musze jakieś mapowanie jeszcze zrobić? Prosze o pomoc. Dzięki Ten post edytował dopelganger 9.05.2017, 13:32:44 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 744 Pomógł: 118 Dołączył: 14.02.2009 Skąd: poziome Ostrzeżenie: (0%) ![]() ![]() |
Implementation
For convenience's sake foo.bar does the following things on the PHP layer: check if foo is an array and bar a valid element; if not, and if foo is an object, check that bar is a valid property; if not, and if foo is an object, check that bar is a valid method (even if bar is the constructor - use __construct() instead); if not, and if foo is an object, check that getBar is a valid method; if not, and if foo is an object, check that isBar is a valid method; if not, and if foo is an object, check that hasBar is a valid method; if not, return a null value. foo['bar'] on the other hand only works with PHP arrays: check if foo is an array and bar a valid element; if not, return a null value. |
|
|
![]() ![]() |
![]() |
Aktualny czas: 15.10.2025 - 00:07 |