<commit_before><?php
/**
 * Defines the Link page type
 */
class LinksFolder extends Page {
   static $db = array(
   );
  

  static $has_many = array('Links' => 'Link');

   function getCMSFields() {
		$fields = parent::getCMSFields();
		$fields->renameField("Content", "Description");

			$mng_records = new DataObjectManager(
			$this,
			'Links',
			'Link',
			array('Title' => 'Title','URL' => 'URL'),
			'getCMSFields_forPopup'
		);



		$fields->addFieldToTab('Root.Content.Links', $mng_records);

	   return $fields;
	}

}
 
class LinksFolder_Controller extends Page_Controller {
 
}
 
?><commit_msg>UPGRADESS3: Now compliant with ss3. Added grid field, but still a few issues to sort out<commit_after><?php
/**
 * Defines the Link page type
 */
class LinksFolder extends Page {
   static $db = array(
   );
  

  static $has_many = array('Links' => 'Link');

/*
	static $many_many_extraFields = array( 
        'Links' => array( 
                'SortOrder' => "Int" 
        )
	);
*/
   function getCMSFields() {
		$fields = parent::getCMSFields();
		$fields->renameField("Content", "Description");


		$gridFieldConfig = GridFieldConfig::create()->addComponents(
          new GridFieldToolbarHeader(),
          new GridFieldAddNewButton('toolbar-header-right'),
          new GridFieldSortableHeader(),
          new GridFieldDataColumns(),
          new GridFieldPaginator(10),
          new GridFieldEditButton(),
          new GridFieldDeleteAction('unlinkRelation'),
          new GridFieldDetailForm()
//          new GridFieldBulkEditingTools()
        );

        $gridField = new GridField("Links", "List of Links:", $this->Links()->sort('SortOrder'), $gridFieldConfig);
        $fields->addFieldToTab("Root.Links", $gridField);



		//$fields->addFieldToTab('Root.Content.Links', $mng_records);

	   return $fields;
	}

}
 
class LinksFolder_Controller extends Page_Controller {
 
}
 
?>
{'fraction_non_alphanumeric': 0.14397905759162305, 'fraction_numerical': 0.0020942408376963353, 'mean_word_length': 3.2466666666666666, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6159489', 'n_tokens_mistral': 624, 'n_tokens_neox': 575, 'n_words': 124}