Преглед изворни кода

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 
 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 
 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
 .. code-block:: php
 
 
@@ -116,14 +116,8 @@ also define the sort by field to be position
 
 
     public $last_position = 0;
     public $last_position = 0;
 
 
-    private $container;
     private $positionService;
     private $positionService;
 
 
-    public function setContainer(\Symfony\Component\DependencyInjection\ContainerInterface $container)
-    {
-        $this->container = $container;
-    }
-
     public function setPositionService(\Pix\SortableBehaviorBundle\Services\PositionHandler $positionHandler)
     public function setPositionService(\Pix\SortableBehaviorBundle\Services\PositionHandler $positionHandler)
     {
     {
         $this->positionService = $positionHandler;
         $this->positionService = $positionHandler;
@@ -152,7 +146,6 @@ And in  the services.yml add the following call
 
 
 .. code-block:: yaml
 .. code-block:: yaml
     
     
-	- [ setContainer, [ @service_container ] ]
 	- [ setPositionService, [@pix_sortable_behavior.position]]
 	- [ setPositionService, [@pix_sortable_behavior.position]]