src/ElementsExtension.php
public static function move_elements_manager(
        FieldList $fields,
        string $relationName,
        string $newTabName = 'Root.Main',
        string $insertBefore = null
    ): FieldList
    {
        $itemsGf = $fields->dataFieldByName($relationName);
        $fields
            ->removeByName($relationName)
            ->addFieldToTab($newTabName, $itemsGf, $insertBefore)
        ;

        return $fields;
    }
public static function move_elements_manager(
        FieldList $fields,
        string $relationName,
        string $newTabName = 'Root.Main',
        string $insertBefore = null
    ): FieldList
    {
        $itemsGf = $fields->dataFieldByName($relationName);
        $fields
            ->removeByName($relationName)
            ->addFieldToTab($newTabName, $itemsGf, $insertBefore)
        ;

        return $fields;
    }
public static function move_elements_manager ( FieldList $ fields , string $ relationName , string $ newTabName = 'Root.Main' , string $ insertBefore = null ) : FieldList { $ itemsGf = $ fields -> dataFieldByName ( $ relationName ) ; $ fields -> removeByName ( $ relationName ) -> addFieldToTab ( $ newTabName , $ itemsGf , $ insertBefore ) ; return $ fields ; }
Move an elements gridfield to an other tab.

@param  FieldList $fields
@param  string    $relationName
@param  string    $newTabName
@param  string    $insertBefore      optional: insert before an other field
@return FieldList                    the altered fields
Move an elements gridfield to an other tab .