Permalink
Browse files

Used setter for children at all places

  • Loading branch information...
1 parent c730b8a commit f383de88b050040782e4000d8fa07ed8c449a9a6 @hason hason committed Mar 3, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Knp/Menu/MenuItem.php
View
4 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 f383de8

Please sign in to comment.