Bläddra i källkod

remove unused code

Thomas 14 år sedan
förälder
incheckning
4858396e61
2 ändrade filer med 1 tillägg och 16 borttagningar
  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');
             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) {
         foreach ($collection as $name => $value) {
             $this->add($this->newField($name, $name));
             $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 CheckboxField('_delete'));
-//        $this->add(new TextField('_position'));
-        
+
         parent::__construct($key, $options);
         parent::__construct($key, $options);
     }
     }
 
 
@@ -48,10 +47,6 @@ class EditableFieldGroup extends FieldGroup
                 continue;
                 continue;
             }
             }
 
 
-            if($field->getKey() == '_position') {
-                continue;
-            }
-
             $field->updateFromProperty($objectOrArray);
             $field->updateFromProperty($objectOrArray);
         }
         }
     }
     }
@@ -69,10 +64,6 @@ class EditableFieldGroup extends FieldGroup
                 continue;
                 continue;
             }
             }
 
 
-            if($field->getKey() == '_position') {
-                continue;
-            }
-
             $field->updateProperty($objectOrArray);
             $field->updateProperty($objectOrArray);
         }
         }
     }
     }