Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Used setter for children at all places #133

Merged
merged 1 commit into from

2 participants

@hason

No description provided.

@Nek- Nek- merged commit ff1a6e7 into KnpLabs:master
@hason hason deleted the hason:patch-1 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 3, 2014
  1. @hason
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Knp/Menu/MenuItem.php
View
4 src/Knp/Menu/MenuItem.php
@@ -442,7 +442,7 @@ public function reorderChildren($order)
$newChildren[$name] = $child;
}
- $this->children = $newChildren;
+ $this->setChildren($newChildren);
return $this;
}
@@ -450,7 +450,7 @@ public function reorderChildren($order)
public function copy()
{
$newMenu = clone $this;
- $newMenu->children = array();
+ $newMenu->setChildren(array());
$newMenu->setParent(null);
foreach ($this->getChildren() as $child) {
$newMenu->addChild($child->copy());
Something went wrong with that request. Please try again.