src/bbn/appui/menus.php
public function clone(string $id, string $name): ?string
  {
    if ( \bbn\str::is_uid($id) && ($id_menu = $this->add(['text' => $name])) ){
      if ( ($bits = $this->pref->get_full_bits($id)) && !$this->_clone($id_menu, $bits) ){
        return null;
      }
      return $id_menu;
    }
    return null;
  }
public function clone(string $id, string $name): ?string
  {
    if ( \bbn\str::is_uid($id) && ($id_menu = $this->add(['text' => $name])) ){
      if ( ($bits = $this->pref->get_full_bits($id)) && !$this->_clone($id_menu, $bits) ){
        return null;
      }
      return $id_menu;
    }
    return null;
  }
public function clone ( string $ id , string $ name ) : ? string { if ( \ bbn \ str :: is_uid ( $ id ) && ( $ id_menu = $ this -> add ( [ 'text' => $ name ] ) ) ) { if ( ( $ bits = $ this -> pref -> get_full_bits ( $ id ) ) && ! $ this -> _clone ( $ id_menu , $ bits ) ) { return null ; } return $ id_menu ; } return null ; }
Clones a menu

@param string $id The menu's ID to clone
@param string $name The new menu's name
@return null|string The new ID
Clones a menu