瀏覽代碼

Fix #2685

Removed extraneous setContainer call in sortable listing recipe
Stepan Anchugov 10 年之前
父節點
當前提交
a0abd67391
共有 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]]