Преглед на файлове

Merge pull request #2686 from kix/issue-2685

Fix #2685
Andrej Hudec преди 10 години
родител
ревизия
41ecba8f2c
променени са 1 файла, в които са добавени 2 реда и са изтрити 9 реда
  1. 2 9
      Resources/doc/cookbook/recipe_sortable_listing.rst

+ 2 - 9
Resources/doc/cookbook/recipe_sortable_listing.rst

@@ -105,9 +105,9 @@ Now you can update your ``services.yml`` to use the handler provider by the pixS
 
 
 Last tricky part, in order to get the last position available in our twig template 
-we inject the service container in our admin class, define a public variable ``$last_position`` 
+we inject the position service into our admin class, define a public variable ``$last_position`` 
 and retrieve the value from our service in the ``configureListFields`` method. We 
-also define the sort by field to be position 
+also define the sort by field to be position:
 
 .. code-block:: php
 
@@ -116,14 +116,8 @@ also define the sort by field to be position
 
     public $last_position = 0;
 
-    private $container;
     private $positionService;
 
-    public function setContainer(\Symfony\Component\DependencyInjection\ContainerInterface $container)
-    {
-        $this->container = $container;
-    }
-
     public function setPositionService(\Pix\SortableBehaviorBundle\Services\PositionHandler $positionHandler)
     {
         $this->positionService = $positionHandler;
@@ -152,7 +146,6 @@ And in  the services.yml add the following call
 
 .. code-block:: yaml
     
-	- [ setContainer, [ @service_container ] ]
 	- [ setPositionService, [@pix_sortable_behavior.position]]