/** * Split menu tree into two distinct trees. * * @param mixed $length Name of child, child object, or numeric length. * @return array Array with two trees, with "primary" and "secondary" key */ public function split($length) { $ret = parent::split($length); $ret['secondary']->setTree($this->getTree()->copy($ret['secondary']), true); return $ret; }