Permalink
Browse files

Merge pull request #133 from hason/patch-1

Used setter for children at all places
  • Loading branch information...
Nek- committed Mar 7, 2014
2 parents c730b8a + f383de8 commit ff1a6e73e79c9f75c6a130d03b07f05c89fede63
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Knp/Menu/MenuItem.php
@@ -442,15 +442,15 @@ public function reorderChildren($order)
$newChildren[$name] = $child;
}
- $this->children = $newChildren;
+ $this->setChildren($newChildren);
return $this;
}
public function copy()
{
$newMenu = clone $this;
- $newMenu->children = array();
+ $newMenu->setChildren(array());
$newMenu->setParent(null);
foreach ($this->getChildren() as $child) {
$newMenu->addChild($child->copy());

0 comments on commit ff1a6e7

Please sign in to comment.