public function getMenuIdFor(int $itemId): int
    {
        // Find parent identifier
        $menuId = (int)$this
            ->database
            ->query(
                "SELECT menu_id FROM {umenu_item} WHERE id = ?",
                [$itemId]
            )
            ->fetchField()
        ;

        if (!$menuId) {
            throw new \InvalidArgumentException(sprintf("Item %d does not exist", $itemId));
        }

        return $menuId;
    }
public function getMenuIdFor(int $itemId): int
    {
        // Find parent identifier
        $menuId = (int)$this
            ->database
            ->query(
                "SELECT menu_id FROM {umenu_item} WHERE id = ?",
                [$itemId]
            )
            ->fetchField()
        ;

        if (!$menuId) {
            throw new \InvalidArgumentException(sprintf("Item %d does not exist", $itemId));
        }

        return $menuId;
    }
public function getMenuIdFor ( int $ itemId ) : int { // Find parent identifier $ menuId = ( int ) $ this -> database -> query ( "SELECT menu_id FROM {umenu_item} WHERE id = ?" , [ $ itemId ] ) -> fetchField ( ) ; if ( ! $ menuId ) { throw new \ InvalidArgumentException ( sprintf ( "Item %d does not exist" , $ itemId ) ) ; } return $ menuId ; }
Get menu identifier for item

@param int $itemId

@return int
Get menu identifier for item