Selaa lähdekoodia

remove unused code

Thomas 14 vuotta sitten
vanhempi
commit
4858396e61
2 muutettua tiedostoa jossa 1 lisäystä ja 16 poistoa
  1. 0 6
      Form/EditableCollectionField.php
  2. 1 10
      Form/EditableFieldGroup.php

+ 0 - 6
Form/EditableCollectionField.php

@@ -109,12 +109,6 @@ class EditableCollectionField extends FieldGroup
             throw new UnexpectedTypeException($collection, 'array or \Traversable');
         }
 
-//        foreach ($this as $name => $field) {
-//            if (!$this->getOption('modifiable') || '$$key$$' != $name) {
-//                $this->remove($name);
-//            }
-//        }
-
         foreach ($collection as $name => $value) {
             $this->add($this->newField($name, $name));
         }

+ 1 - 10
Form/EditableFieldGroup.php

@@ -30,8 +30,7 @@ class EditableFieldGroup extends FieldGroup
     {
 
         $this->add(new CheckboxField('_delete'));
-//        $this->add(new TextField('_position'));
-        
+
         parent::__construct($key, $options);
     }
 
@@ -48,10 +47,6 @@ class EditableFieldGroup extends FieldGroup
                 continue;
             }
 
-            if($field->getKey() == '_position') {
-                continue;
-            }
-
             $field->updateFromProperty($objectOrArray);
         }
     }
@@ -69,10 +64,6 @@ class EditableFieldGroup extends FieldGroup
                 continue;
             }
 
-            if($field->getKey() == '_position') {
-                continue;
-            }
-
             $field->updateProperty($objectOrArray);
         }
     }