Browse Source

evenements

François 6 năm trước cách đây
mục cha
commit
1af111ff9b

+ 115 - 85
.idea/workspace.xml

@@ -2,12 +2,14 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="3c5ee217-7f14-4e90-abcb-4d394d69ee22" name="Default Changelist" comment="">
-      <change afterPath="$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/auteur.html.twig" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/DocumentBundle/Entity/Evenement.php" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/DocumentBundle/Repository/EvenementRepository.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/DocumentBundle/Controller/LivreController.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/DocumentBundle/Controller/LivreController.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/DocumentBundle/Entity/Auteur.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/DocumentBundle/Entity/Auteur.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/DocumentBundle/Entity/Invite.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/DocumentBundle/Entity/Invite.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/DocumentBundle/Entity/Livre.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/DocumentBundle/Entity/Livre.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/livre.html.twig" beforeDir="false" afterPath="$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/livre.html.twig" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/auteur.html.twig" beforeDir="false" afterPath="$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/auteur.html.twig" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
@@ -52,9 +54,9 @@
           <entry key="html" value="2" />
           <entry key="ico" value="1" />
           <entry key="log" value="1" />
-          <entry key="php" value="43" />
+          <entry key="php" value="45" />
           <entry key="png" value="1" />
-          <entry key="twig" value="17" />
+          <entry key="twig" value="20" />
           <entry key="yml" value="20" />
         </counts>
       </usages-collector>
@@ -63,9 +65,9 @@
           <entry key="CSS" value="1" />
           <entry key="HTML" value="2" />
           <entry key="Image" value="2" />
-          <entry key="PHP" value="35" />
+          <entry key="PHP" value="37" />
           <entry key="PLAIN_TEXT" value="9" />
-          <entry key="Twig" value="17" />
+          <entry key="Twig" value="20" />
           <entry key="YAML" value="20" />
           <entry key="htaccess" value="1" />
         </counts>
@@ -75,8 +77,8 @@
           <entry key="css" value="30" />
           <entry key="dummy" value="26" />
           <entry key="html" value="2" />
-          <entry key="php" value="5152" />
-          <entry key="twig" value="2292" />
+          <entry key="php" value="5747" />
+          <entry key="twig" value="2312" />
           <entry key="txt" value="1" />
           <entry key="yml" value="264" />
         </counts>
@@ -85,9 +87,9 @@
         <counts>
           <entry key="CSS" value="30" />
           <entry key="HTML" value="2" />
-          <entry key="PHP" value="4338" />
+          <entry key="PHP" value="4933" />
           <entry key="PLAIN_TEXT" value="841" />
-          <entry key="Twig" value="2292" />
+          <entry key="Twig" value="2312" />
           <entry key="YAML" value="264" />
         </counts>
       </usages-collector>
@@ -109,15 +111,17 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Controller/LivreController.php">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="389">
-              <caret line="41" column="30" selection-start-line="41" selection-start-column="30" selection-end-line="41" selection-end-column="30" />
+            <state relative-caret-position="374">
+              <caret line="68" column="5" selection-start-line="68" selection-start-column="5" selection-end-line="68" selection-end-column="5" />
               <folding>
                 <element signature="e#45#102#0#PHP" expanded="true" />
                 <element signature="e#477#513#0#PHP" expanded="true" />
                 <element signature="e#821#843#1#PHP" expanded="true" />
                 <element signature="e#848#884#0#PHP" expanded="true" />
-                <element signature="e#1254#1277#1#PHP" expanded="true" />
+                <element signature="e#1195#1218#1#PHP" expanded="true" />
                 <element signature="e#1345#1382#0#PHP" expanded="true" />
+                <element signature="e#1584#1607#1#PHP" expanded="true" />
+                <element signature="e#1697#1734#0#PHP" expanded="true" />
                 <element signature="e#1566#1605#0#PHP" expanded="true" />
               </folding>
             </state>
@@ -125,78 +129,82 @@
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/auteur.html.twig">
+        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Repository/EvenementRepository.php">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="300">
-              <caret line="20" column="12" selection-start-line="20" selection-start-column="12" selection-end-line="20" selection-end-column="12" />
+            <state relative-caret-position="195">
+              <caret line="13" selection-start-line="13" selection-end-line="13" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Repository/AuteurRepository.php">
-          <provider selected="true" editor-type-id="text-editor" />
+        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/index.html.twig">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="225">
+              <caret line="15" column="15" selection-start-line="15" selection-start-column="15" selection-end-line="15" selection-end-column="15" />
+            </state>
+          </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Auteur.php">
+        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Evenement.php">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="255">
-              <caret line="17" column="45" selection-start-line="17" selection-start-column="45" selection-end-line="17" selection-end-column="45" />
+            <state relative-caret-position="375">
+              <caret line="52" column="83" lean-forward="true" selection-start-line="52" selection-start-column="83" selection-end-line="52" selection-end-column="83" />
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Invite.php">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/auteur.html.twig">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="315">
-              <caret line="35" column="20" lean-forward="true" selection-start-line="35" selection-start-column="20" selection-end-line="35" selection-end-column="20" />
+            <state relative-caret-position="240">
+              <caret line="16" selection-start-line="16" selection-end-line="16" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Repository/InviteRepository.php">
+        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/livre.html.twig">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="195">
-              <caret line="13" selection-start-line="13" selection-end-line="13" />
+            <state relative-caret-position="329">
+              <caret line="30" column="12" selection-start-line="30" selection-start-column="12" selection-end-line="30" selection-end-column="12" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Livre.php">
+        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Auteur.php">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="285">
-              <caret line="52" column="72" selection-start-line="52" selection-start-column="72" selection-end-line="52" selection-end-column="72" />
+              <caret line="52" column="82" selection-start-line="52" selection-start-column="76" selection-end-line="52" selection-end-column="82" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Repository/LivreRepository.php">
+        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Invite.php">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="195">
-              <caret line="13" selection-start-line="13" selection-end-line="13" />
+            <state relative-caret-position="210">
+              <caret line="38" column="84" lean-forward="true" selection-start-line="38" selection-start-column="84" selection-end-line="38" selection-end-column="84" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/app/config/parameters.yml">
+        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/acces.html.twig">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="180">
-              <caret line="12" selection-start-line="12" selection-end-line="12" />
+            <state>
+              <caret column="17" selection-start-column="17" selection-end-column="17" />
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/livre.html.twig">
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Livre.php">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="224">
-              <caret line="25" column="39" selection-start-line="25" selection-start-column="39" selection-end-line="25" selection-end-column="39" />
+            <state relative-caret-position="240">
+              <caret line="52" column="85" selection-start-line="52" selection-start-column="85" selection-end-line="52" selection-end-column="85" />
             </state>
           </provider>
         </entry>
@@ -213,6 +221,7 @@
   <component name="FindInProjectRecents">
     <findStrings>
       <find>fra</find>
+      <find>$date</find>
     </findStrings>
   </component>
   <component name="Git.Settings">
@@ -244,12 +253,13 @@
         <option value="$PROJECT_DIR$/src/DocumentBundle/Classe/Livre.php" />
         <option value="$PROJECT_DIR$/app/config/parameters.yml" />
         <option value="$PROJECT_DIR$/src/DocumentBundle/Classe/Bouquin.php" />
-        <option value="$PROJECT_DIR$/src/DocumentBundle/Entity/Livre.php" />
         <option value="$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/livre.html.twig" />
         <option value="$PROJECT_DIR$/src/DocumentBundle/Entity/Auteur.php" />
         <option value="$PROJECT_DIR$/src/DocumentBundle/Controller/LivreController.php" />
         <option value="$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/auteur.html.twig" />
         <option value="$PROJECT_DIR$/src/DocumentBundle/Entity/Invite.php" />
+        <option value="$PROJECT_DIR$/src/DocumentBundle/Entity/Evenement.php" />
+        <option value="$PROJECT_DIR$/src/DocumentBundle/Entity/Livre.php" />
       </list>
     </option>
   </component>
@@ -516,18 +526,18 @@
       <workItem from="1539690771861" duration="554000" />
       <workItem from="1539691350473" duration="10691000" />
       <workItem from="1539761038969" duration="7127000" />
-      <workItem from="1539768307690" duration="9014000" />
+      <workItem from="1539768307690" duration="13427000" />
     </task>
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="49957000" />
+    <option name="totallyTimeSpent" value="54370000" />
   </component>
   <component name="ToolWindowManager">
     <frame x="67" y="25" width="1853" height="1055" extended-state="6" />
     <editor active="true" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.27614832" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.27614832" />
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
       <window_info id="Favorites" order="2" side_tool="true" />
       <window_info anchor="bottom" id="Message" order="0" />
@@ -540,7 +550,7 @@
       <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
       <window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
       <window_info anchor="bottom" id="Version Control" order="9" show_stripe_button="false" />
-      <window_info active="true" anchor="bottom" id="Terminal" order="10" sideWeight="0.4980631" visible="true" weight="0.32864866" />
+      <window_info anchor="bottom" id="Terminal" order="10" sideWeight="0.4980631" visible="true" weight="0.32864866" />
       <window_info anchor="bottom" id="Event Log" order="11" sideWeight="0.5019369" side_tool="true" weight="0.32864866" />
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
@@ -667,13 +677,6 @@
       <provider selected="true" editor-type-id="text-editor" />
     </entry>
     <entry file="file://$PROJECT_DIR$/web/bundles/DocumentBundle/assets/css/style.css" />
-    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/index.html.twig">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="225">
-          <caret line="15" column="15" selection-start-line="15" selection-start-column="15" selection-end-line="15" selection-end-column="15" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/derniers.html.twig">
       <provider selected="true" editor-type-id="text-editor">
         <state>
@@ -716,13 +719,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/acces.html.twig">
-      <provider selected="true" editor-type-id="text-editor">
-        <state>
-          <caret column="14" selection-start-column="3" selection-end-column="14" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/app/Resources/views/layout.html.twig">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="405">
@@ -747,71 +743,105 @@
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Repository/AuteurRepository.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="195">
+          <caret line="13" selection-start-line="13" selection-end-line="13" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Repository/InviteRepository.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="195">
+          <caret line="13" selection-start-line="13" selection-end-line="13" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Repository/LivreRepository.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="195">
+          <caret line="13" selection-start-line="13" selection-end-line="13" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/auteur.html.twig">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="240">
+          <caret line="16" selection-start-line="16" selection-end-line="16" />
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Controller/LivreController.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="389">
-          <caret line="41" column="30" selection-start-line="41" selection-start-column="30" selection-end-line="41" selection-end-column="30" />
+        <state relative-caret-position="374">
+          <caret line="68" column="5" selection-start-line="68" selection-start-column="5" selection-end-line="68" selection-end-column="5" />
           <folding>
             <element signature="e#45#102#0#PHP" expanded="true" />
             <element signature="e#477#513#0#PHP" expanded="true" />
             <element signature="e#821#843#1#PHP" expanded="true" />
             <element signature="e#848#884#0#PHP" expanded="true" />
-            <element signature="e#1254#1277#1#PHP" expanded="true" />
+            <element signature="e#1195#1218#1#PHP" expanded="true" />
             <element signature="e#1345#1382#0#PHP" expanded="true" />
+            <element signature="e#1584#1607#1#PHP" expanded="true" />
+            <element signature="e#1697#1734#0#PHP" expanded="true" />
             <element signature="e#1566#1605#0#PHP" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/livre.html.twig">
+    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/index.html.twig">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="224">
-          <caret line="25" column="39" selection-start-line="25" selection-start-column="39" selection-end-line="25" selection-end-column="39" />
+        <state relative-caret-position="225">
+          <caret line="15" column="15" selection-start-line="15" selection-start-column="15" selection-end-line="15" selection-end-column="15" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/auteur.html.twig">
+    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/livre.html.twig">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="300">
-          <caret line="20" column="12" selection-start-line="20" selection-start-column="12" selection-end-line="20" selection-end-column="12" />
+        <state relative-caret-position="329">
+          <caret line="30" column="12" selection-start-line="30" selection-start-column="12" selection-end-line="30" selection-end-column="12" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Auteur.php">
+    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Resources/views/Document/acces.html.twig">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="255">
-          <caret line="17" column="45" selection-start-line="17" selection-start-column="45" selection-end-line="17" selection-end-column="45" />
+        <state>
+          <caret column="17" selection-start-column="17" selection-end-column="17" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Livre.php">
+    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Repository/EvenementRepository.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="285">
-          <caret line="52" column="72" selection-start-line="52" selection-start-column="72" selection-end-line="52" selection-end-column="72" />
+        <state relative-caret-position="195">
+          <caret line="13" selection-start-line="13" selection-end-line="13" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Repository/LivreRepository.php">
+    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Evenement.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="195">
-          <caret line="13" selection-start-line="13" selection-end-line="13" />
+        <state relative-caret-position="375">
+          <caret line="52" column="83" lean-forward="true" selection-start-line="52" selection-start-column="83" selection-end-line="52" selection-end-column="83" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Repository/AuteurRepository.php">
-      <provider selected="true" editor-type-id="text-editor" />
+    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Invite.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="210">
+          <caret line="38" column="84" lean-forward="true" selection-start-line="38" selection-start-column="84" selection-end-line="38" selection-end-column="84" />
+        </state>
+      </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Repository/InviteRepository.php">
+    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Auteur.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="195">
-          <caret line="13" selection-start-line="13" selection-end-line="13" />
+        <state relative-caret-position="285">
+          <caret line="52" column="82" selection-start-line="52" selection-start-column="76" selection-end-line="52" selection-end-column="82" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Invite.php">
+    <entry file="file://$PROJECT_DIR$/src/DocumentBundle/Entity/Livre.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="315">
-          <caret line="35" column="20" lean-forward="true" selection-start-line="35" selection-start-column="20" selection-end-line="35" selection-end-column="20" />
+        <state relative-caret-position="240">
+          <caret line="52" column="85" selection-start-line="52" selection-start-column="85" selection-end-line="52" selection-end-column="85" />
         </state>
       </provider>
     </entry>

+ 18 - 2
src/DocumentBundle/Controller/LivreController.php

@@ -27,7 +27,7 @@ class LivreController extends Controller
     /**
      * @Route ("/affichelivre/{id}", name="document_affichelivre")
      */
-    public function afficheLivre($id) {
+    public function afficheLivreAction($id) {
 
         $em = $this->getDoctrine()->getManager();
         $rep = $em->getRepository("DocumentBundle:Livre");
@@ -41,7 +41,7 @@ class LivreController extends Controller
     /**
      * @Route ("/affichelivreauteur/{id}", name="document_auteur")
      */
-    public function afficheLivreAuteur ($id)
+    public function afficheLivreAuteurAction ($id)
     {
         $em = $this->getDoctrine()->getManager();
         $rep = $em->getRepository('DocumentBundle:Auteur');
@@ -50,9 +50,25 @@ class LivreController extends Controller
         return $this->render('@Document\Document\auteur.html.twig', array(
             "auteur" =>  $auteur
         ));
+    }
+
+    /**
+     * @Route ("/invite/{id}", name="document_invite")
+     */
+    public function inviteAction ($id)
+    {
+        $em = $this->getDoctrine()->getManager();
+        $rep = $em->getRepository('DocumentBundle:Invite');
+        $invite = $rep->find($id);
+        $auteur = $invite->getAuteur();
 
+
+        return $this->render('@Document\Document\auteur.html.twig', array(
+            "auteur" =>  $auteur
+        ));
     }
 
+
     public function derniersLivresAction ()
     {
         $phrase = "Les 3 derniers livres";

+ 29 - 0
src/DocumentBundle/Entity/Auteur.php

@@ -55,6 +55,11 @@ class Auteur
      */
     private $livres;
 
+    /**
+     * @ORM\OneToOne(targetEntity="DocumentBundle\Entity\Invite", mappedBy="auteur")
+     * @var \DocumentBundle\Entity\Invite
+     */
+    private $invite;
 
     /**
      * Get id
@@ -204,4 +209,28 @@ class Auteur
     {
         return $this->livres;
     }
+
+    /**
+     * Set invite.
+     *
+     * @param \DocumentBundle\Entity\Invite|null $invite
+     *
+     * @return Auteur
+     */
+    public function setInvite(\DocumentBundle\Entity\Invite $invite = null)
+    {
+        $this->invite = $invite;
+
+        return $this;
+    }
+
+    /**
+     * Get invite.
+     *
+     * @return \DocumentBundle\Entity\Invite|null
+     */
+    public function getInvite()
+    {
+        return $this->invite;
+    }
 }

+ 212 - 0
src/DocumentBundle/Entity/Auteur.php~

@@ -0,0 +1,212 @@
+<?php
+
+namespace DocumentBundle\Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+
+/**
+ * Auteur
+ *
+ * @ORM\Table(name="auteur")
+ * @ORM\Entity(repositoryClass="DocumentBundle\Repository\AuteurRepository")
+ */
+class Auteur
+{
+    /**
+     * @var int
+     *
+     * @ORM\Column(name="id", type="integer")
+     * @ORM\Id
+     * @ORM\GeneratedValue(strategy="AUTO")
+     */
+    private $id;
+
+    /**
+     * @var string
+     *
+     * @ORM\Column(name="prenom", type="string", length=255)
+     */
+    private $prenom;
+
+    /**
+     * @var string
+     *
+     * @ORM\Column(name="nom", type="string", length=255)
+     */
+    private $nom;
+
+    /**
+     * @var string
+     *
+     * @ORM\Column(name="biographie", type="string", length=255)
+     */
+    private $biographie;
+
+    /**
+     * @var string
+     *
+     * @ORM\Column(name="genre", type="string", length=255)
+     */
+    private $genre;
+
+    /**
+     * @ORM\OneToMany(targetEntity="DocumentBundle\Entity\Livre", mappedBy="auteur")
+     * @var \Doctrine\Common\Collections\Collection
+     */
+    private $livres;
+
+    /**
+     * @ORM\OneToOne(targetEntity="DocumentBundle\Entity\Invite", mappedBy="invite")
+     * @var \DocumentBundle\Entity\Invite
+     */
+    private $invite;
+
+    /**
+     * Get id
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    /**
+     * Set prenom.
+     *
+     * @param string $prenom
+     *
+     * @return Auteur
+     */
+    public function setPrenom($prenom)
+    {
+        $this->prenom = $prenom;
+
+        return $this;
+    }
+
+    /**
+     * Get prenom.
+     *
+     * @return string
+     */
+    public function getPrenom()
+    {
+        return $this->prenom;
+    }
+
+    /**
+     * Set nom.
+     *
+     * @param string $nom
+     *
+     * @return Auteur
+     */
+    public function setNom($nom)
+    {
+        $this->nom = $nom;
+
+        return $this;
+    }
+
+    /**
+     * Get nom.
+     *
+     * @return string
+     */
+    public function getNom()
+    {
+        return $this->nom;
+    }
+
+    /**
+     * Set biographie.
+     *
+     * @param string $biographie
+     *
+     * @return Auteur
+     */
+    public function setBiographie($biographie)
+    {
+        $this->biographie = $biographie;
+
+        return $this;
+    }
+
+    /**
+     * Get biographie.
+     *
+     * @return string
+     */
+    public function getBiographie()
+    {
+        return $this->biographie;
+    }
+
+    /**
+     * Set genre.
+     *
+     * @param string $genre
+     *
+     * @return Auteur
+     */
+    public function setGenre($genre)
+    {
+        $this->genre = $genre;
+
+        return $this;
+    }
+
+    /**
+     * Get genre.
+     *
+     * @return string
+     */
+    public function getGenre()
+    {
+        return $this->genre;
+    }
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->livres = new \Doctrine\Common\Collections\ArrayCollection();
+    }
+
+    /**
+     * Add livre.
+     *
+     * @param \DocumentBundle\Entity\Livre $livre
+     *
+     * @return Auteur
+     */
+    public function addLivre(\DocumentBundle\Entity\Livre $livre)
+    {
+        $this->livres[] = $livre;
+
+        return $this;
+    }
+
+    /**
+     * Remove livre.
+     *
+     * @param \DocumentBundle\Entity\Livre $livre
+     *
+     * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
+     */
+    public function removeLivre(\DocumentBundle\Entity\Livre $livre)
+    {
+        return $this->livres->removeElement($livre);
+    }
+
+    /**
+     * Get livres.
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getLivres()
+    {
+        return $this->livres;
+    }
+}

+ 206 - 0
src/DocumentBundle/Entity/Evenement.php

@@ -0,0 +1,206 @@
+<?php
+
+namespace DocumentBundle\Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+
+/**
+ * Evenement
+ *
+ * @ORM\Table(name="evenement")
+ * @ORM\Entity(repositoryClass="DocumentBundle\Repository\EvenementRepository")
+ */
+class Evenement
+{
+    /**
+     * @var int
+     *
+     * @ORM\Column(name="id", type="integer")
+     * @ORM\Id
+     * @ORM\GeneratedValue(strategy="AUTO")
+     */
+    private $id;
+
+    /**
+     * @var string
+     *
+     * @ORM\Column(name="titre", type="string", length=255)
+     */
+    private $titre;
+
+    /**
+     * @var \DateTime
+     *
+     * @ORM\Column(name="date_evenement", type="datetime")
+     */
+    private $dateEvenement;
+
+    /**
+     * @var string|null
+     *
+     * @ORM\Column(name="description", type="string", length=255, nullable=true)
+     */
+    private $description;
+
+    /**
+     * @var string
+     *
+     * @ORM\Column(name="type", type="string", length=255)
+     */
+    private $type;
+
+    /**
+     * @ORM\ManyToMany(targetEntity="DocumentBundle\Entity\Invite", inversedBy="evenements")
+     * @var \Doctrine\Common\Collections\Collection
+     */
+    private $invites;
+
+    /**
+     * Get id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    /**
+     * Set titre.
+     *
+     * @param string $titre
+     *
+     * @return Evenement
+     */
+    public function setTitre($titre)
+    {
+        $this->titre = $titre;
+
+        return $this;
+    }
+
+    /**
+     * Get titre.
+     *
+     * @return string
+     */
+    public function getTitre()
+    {
+        return $this->titre;
+    }
+
+    /**
+     * Set date.
+     *
+     * @param \DateTime $date
+     *
+     * @return Evenement
+     */
+    public function setDateEvenement($dateEvenement)
+    {
+        $this->dateEvenement = $dateEvenement;
+
+        return $this;
+    }
+
+    /**
+     * Get date.
+     *
+     * @return \DateTime
+     */
+    public function getDateEvenement()
+    {
+        return $this->dateEvenement;
+    }
+
+    /**
+     * Set description.
+     *
+     * @param string|null $description
+     *
+     * @return Evenement
+     */
+    public function setDescription($description = null)
+    {
+        $this->description = $description;
+
+        return $this;
+    }
+
+    /**
+     * Get description.
+     *
+     * @return string|null
+     */
+    public function getDescription()
+    {
+        return $this->description;
+    }
+
+    /**
+     * Set type.
+     *
+     * @param string $type
+     *
+     * @return Evenement
+     */
+    public function setType($type)
+    {
+        $this->type = $type;
+
+        return $this;
+    }
+
+    /**
+     * Get type.
+     *
+     * @return string
+     */
+    public function getType()
+    {
+        return $this->type;
+    }
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->invites = new \Doctrine\Common\Collections\ArrayCollection();
+    }
+
+    /**
+     * Add invite.
+     *
+     * @param \DocumentBundle\Entity\Invite $invite
+     *
+     * @return Evenement
+     */
+    public function addInvite(\DocumentBundle\Entity\Invite $invite)
+    {
+        $this->invites[] = $invite;
+
+        return $this;
+    }
+
+    /**
+     * Remove invite.
+     *
+     * @param \DocumentBundle\Entity\Invite $invite
+     *
+     * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
+     */
+    public function removeInvite(\DocumentBundle\Entity\Invite $invite)
+    {
+        return $this->invites->removeElement($invite);
+    }
+
+    /**
+     * Get invites.
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getInvites()
+    {
+        return $this->invites;
+    }
+}

+ 48 - 1
src/DocumentBundle/Entity/Invite.php

@@ -31,10 +31,14 @@ class Invite
     /**
      * @var string
      *
-     * @ORM\OneToOne(targetEntity="DocumentBundle\Entity\Auteur")
+     * @ORM\OneToOne(targetEntity="DocumentBundle\Entity\Auteur", inversedBy="invite")
      */
     private $auteur;
 
+    /**
+     * @ORM\ManyToMany(targetEntity="DocumentBundle\Entity\Evenement", mappedBy="invites")
+     */
+    private $evenements;
 
 
     /**
@@ -94,4 +98,47 @@ class Invite
     {
         return $this->auteur;
     }
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->evenements = new \Doctrine\Common\Collections\ArrayCollection();
+    }
+
+    /**
+     * Add evenement.
+     *
+     * @param \DocumentBundle\Entity\Evenement $evenement
+     *
+     * @return Invite
+     */
+    public function addEvenement(\DocumentBundle\Entity\Evenement $evenement)
+    {
+        $this->evenements[] = $evenement;
+
+        return $this;
+    }
+
+    /**
+     * Remove evenement.
+     *
+     * @param \DocumentBundle\Entity\Evenement $evenement
+     *
+     * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
+     */
+    public function removeEvenement(\DocumentBundle\Entity\Evenement $evenement)
+    {
+        return $this->evenements->removeElement($evenement);
+    }
+
+    /**
+     * Get evenements.
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getEvenements()
+    {
+        return $this->evenements;
+    }
 }

+ 29 - 1
src/DocumentBundle/Entity/Invite.php~

@@ -31,10 +31,14 @@ class Invite
     /**
      * @var string
      *
-     * @ORM\OneToOne(targetEntity="DocumentBundle\Entity\Auteur")
+     * @ORM\OneToOne(targetEntity="DocumentBundle\Entity\Auteur", inversedBy="invite")
      */
     private $auteur;
 
+    /**
+     * @ORM\ManyToMany(targetEntity="DocumentBundle\Entity\Evenement", mappedBy="invite")
+     */
+    private $evenements;
 
 
     /**
@@ -70,4 +74,28 @@ class Invite
     {
         return $this->domaine;
     }
+
+    /**
+     * Set auteur.
+     *
+     * @param \DocumentBundle\Entity\Auteur|null $auteur
+     *
+     * @return Invite
+     */
+    public function setAuteur(\DocumentBundle\Entity\Auteur $auteur = null)
+    {
+        $this->auteur = $auteur;
+
+        return $this;
+    }
+
+    /**
+     * Get auteur.
+     *
+     * @return \DocumentBundle\Entity\Auteur|null
+     */
+    public function getAuteur()
+    {
+        return $this->auteur;
+    }
 }

+ 1 - 1
src/DocumentBundle/Entity/Livre.php

@@ -50,7 +50,7 @@ class Livre
     private $format;
 
     /**
-     * @ORM\ManyToOne(targetEntity="DocumentBundle\Entity\Auteur", inversedBy="livre")
+     * @ORM\ManyToOne(targetEntity="DocumentBundle\Entity\Auteur", inversedBy="livres")
      * @ORM\JoinColumn(name="auteur_id", referencedColumnName="id", nullable=false)
      *
      */

+ 13 - 0
src/DocumentBundle/Repository/EvenementRepository.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace DocumentBundle\Repository;
+
+/**
+ * EvenementRepository
+ *
+ * This class was generated by the Doctrine ORM. Add your own custom
+ * repository methods below.
+ */
+class EvenementRepository extends \Doctrine\ORM\EntityRepository
+{
+}

+ 0 - 1
src/DocumentBundle/Resources/views/Document/auteur.html.twig

@@ -28,7 +28,6 @@
 
     </table>
 
-
     {{ render(controller("DocumentBundle:Livre:derniersLivres")) }}
 {%  endblock %}