Thomas Rabaix il y a 11 ans
Parent
commit
8187a50af5
3 fichiers modifiés avec 19 ajouts et 13 suppressions
  1. 2 1
      .travis.yml
  2. 1 0
      Makefile
  3. 16 12
      Resources/doc/reference/action_create_edit.rst

+ 2 - 1
.travis.yml

@@ -9,6 +9,7 @@ php:
 env:
   - SYMFONY_VERSION=2.3.*
   - SYMFONY_VERSION=2.4.*
+  - SYMFONY_VERSION=2.5.*
   - SYMFONY_VERSION=dev-master
 
 before_script:
@@ -16,7 +17,7 @@ before_script:
   - composer install --dev --prefer-source
   - sudo pip install -r Resources/doc/requirements.txt
 
-script: phpunit && cd Resources/doc && sphinx-build -W -b html -d _build/doctrees . _build/html
+script: make test
 
 notifications:
     webhooks: http://sonata-project.org/bundles/admin/master/travis

+ 1 - 0
Makefile

@@ -1,5 +1,6 @@
 test:
 	phpunit
+	cd Resources/doc && sphinx-build -W -b html -d _build/doctrees . _build/html
 
 bower:
 	/usr/local/node/node-v0.10.22/bin/bower update

+ 16 - 12
Resources/doc/reference/action_create_edit.rst

@@ -37,21 +37,25 @@ To specify options, do as follow:
 
 .. code-block:: php
 
-<?php
+    <?php
 
-    public function configureFormFields(FormMapper $formMapper)
+    MyAdmin extends Admin
     {
-        $formMapper
-            ->with('Addresses',
-                array(
-                    'class'       => 'col-md-8',
-                    'description' => 'Lorem ipsum',
+        # ...
+
+        public function configureFormFields(FormMapper $formMapper)
+        {
+            $formMapper
+                ->with('Addresses',
+                    array(
+                        'class'       => 'col-md-8',
+                        'description' => 'Lorem ipsum',
+                        // ...
+                        ))
                     // ...
-                    ))
-                // ...
-            ->end()
-        ;
-
+                ->end()
+            ;
+    }
 
 Embedding other Admins
 ----------------------