Browse Source

Arreglo FD3-165

Faltaba pasar como parametro el id a buscar
gabriel 8 years ago
parent
commit
c969f0df3d
1 changed files with 4 additions and 3 deletions
  1. 4 3
      Form/ChoiceList/Loader/ClientChoiceLoader.php

+ 4 - 3
Form/ChoiceList/Loader/ClientChoiceLoader.php

@@ -179,7 +179,7 @@ class ClientChoiceLoader implements ChoiceLoaderInterface
      */
      */
     protected function choiceExists($id)
     protected function choiceExists($id)
     {
     {
-        $label = array_search($id, $this->initChoices());
+        $label = array_search($id, $this->initChoices(array("id" => $id)));
 
 
         return $label === false ? false : true;
         return $label === false ? false : true;
     }
     }
@@ -195,11 +195,12 @@ class ClientChoiceLoader implements ChoiceLoaderInterface
     }
     }
 
 
     /**
     /**
+     * @param array $params Contiene un array con los datos a verificar.
      * @return array
      * @return array
      */
      */
-    protected function initChoices()
+    protected function initChoices($params = array())
     {
     {
-        return $this->webservice->getChoices('client');
+        return $this->webservice->getChoices('client', $params);
     }
     }
 
 
 }
 }