public function insertBeforeEntry(MenuEntry $new, MenuEntry $pos) {

		foreach($this->entries as $k => $e) {
			if($e === $pos) {
				$this->insertEntry($new, $k);
				break;
			}
		}
		
		return $this;

	}
public function insertBeforeEntry(MenuEntry $new, MenuEntry $pos) {

		foreach($this->entries as $k => $e) {
			if($e === $pos) {
				$this->insertEntry($new, $k);
				break;
			}
		}
		
		return $this;

	}
public function insertBeforeEntry ( MenuEntry $ new , MenuEntry $ pos ) { foreach ( $ this -> entries as $ k => $ e ) { if ( $ e === $ pos ) { $ this -> insertEntry ( $ new , $ k ) ; break ; } } return $ this ; }
insert a MenuEntry before an existing MenuEntry

@param MenuEntry $new
@param MenuEntry $pos
@return Menu
insert a MenuEntry before an existing MenuEntry