public function getEditForm($id = null, $fields = null)
    {
        $form = parent::getEditForm($id, $fields);
        $siteConfig = SiteConfig::current_site_config();
        /**
         * SortOrder is ignored unless sortable is enabled.
         */
        if ($this->modelClass === "Tag" && $siteConfig->AllowTags) {
            $form->Fields()
                ->fieldByName('Tag')
                ->getConfig()
                ->addComponent(
                    new GridFieldOrderableRows(
                        'SortOrder'
                    )
                );
        }
        if ($this->modelClass === "News" && !$siteConfig->AllowExport) {
            $form->Fields()
                ->fieldByName("News")
                ->getConfig()
                ->removeComponentsByType('GridFieldExportButton')
                ->addComponent(
                    new GridfieldNewsPublishAction()
                );
        }

        return $form;
    }
public function getEditForm($id = null, $fields = null)
    {
        $form = parent::getEditForm($id, $fields);
        $siteConfig = SiteConfig::current_site_config();
        /**
         * SortOrder is ignored unless sortable is enabled.
         */
        if ($this->modelClass === "Tag" && $siteConfig->AllowTags) {
            $form->Fields()
                ->fieldByName('Tag')
                ->getConfig()
                ->addComponent(
                    new GridFieldOrderableRows(
                        'SortOrder'
                    )
                );
        }
        if ($this->modelClass === "News" && !$siteConfig->AllowExport) {
            $form->Fields()
                ->fieldByName("News")
                ->getConfig()
                ->removeComponentsByType('GridFieldExportButton')
                ->addComponent(
                    new GridfieldNewsPublishAction()
                );
        }

        return $form;
    }
public function getEditForm ( $ id = null , $ fields = null ) { $ form = parent :: getEditForm ( $ id , $ fields ) ; $ siteConfig = SiteConfig :: current_site_config ( ) ; /**
         * SortOrder is ignored unless sortable is enabled.
         */ if ( $ this -> modelClass === "Tag" && $ siteConfig -> AllowTags ) { $ form -> Fields ( ) -> fieldByName ( 'Tag' ) -> getConfig ( ) -> addComponent ( new GridFieldOrderableRows ( 'SortOrder' ) ) ; } if ( $ this -> modelClass === "News" && ! $ siteConfig -> AllowExport ) { $ form -> Fields ( ) -> fieldByName ( "News" ) -> getConfig ( ) -> removeComponentsByType ( 'GridFieldExportButton' ) -> addComponent ( new GridfieldNewsPublishAction ( ) ) ; } return $ form ; }
Add the sortorder to tags. I guess tags are sortable now.

@param Int $id (No idea)
@param FieldList $fields because I can

@return Form $form, because it comes in handy.
Add the sortorder to tags . I guess tags are sortable now .