Skip to content

Commit

Permalink
getChildren method in Field now returns only active children
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-sk committed Oct 30, 2012
1 parent 20f41ea commit 8702940
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Model/Field.php
Expand Up @@ -121,6 +121,12 @@ public function addChild(FieldInterface $child)
*/
public function getChildren()
{
foreach ($this->children as $child)
{
if (!$child->isActive() || $child->getDeletedAt() != null) {
$this->children->removeElement($child);
}
}
return $this->children;
}

Expand Down

0 comments on commit 8702940

Please sign in to comment.