<commit_before><?php
/**
 * Graphical interface for creating basic flowcharts
 */
class FlowchartAdmin extends ModelAdmin {

 	private static $managed_models = array('FlowchartPage','FlowState');

	private static $url_segment = 'flowcharts';

	private static $menu_title = 'Flowcharts';

	private static $menu_icon = "flowchart/images/flowchart.png";

	private static $tree_class = 'SS_Flowchart';

	public function getEditForm($id = null, $fields = null){
		$form = parent::getEditForm($id, $fields);
		$gridField = $form->Fields()->fieldByName($this->sanitiseClassName($this->modelClass));
		$config = $gridField->getConfig();

		if($this->sanitiseClassName($this->modelClass) == "FlowchartPage"){
			$config->removeComponentsByType('GridFieldDetailForm');
			$config->addComponent(new GridFieldFlowchartDetailForm());
		} else if($this->sanitiseClassName($this->modelClass) == "FlowState"){
			$config->getComponentByType('GridFieldDataColumns')->setDisplayFields(
				singleton($this->sanitiseClassName($this->modelClass))->getCurrentDisplayFields()
			);
		}
		return $form;<commit_msg>Remove add new flowchart page from modeladmin<commit_after><?php
/**
 * Graphical interface for creating basic flowcharts
 */
class FlowchartAdmin extends ModelAdmin {

 	private static $managed_models = array('FlowchartPage','FlowState');

	private static $url_segment = 'flowcharts';

	private static $menu_title = 'Flowcharts';

	private static $menu_icon = "flowchart/images/flowchart.png";

	private static $tree_class = 'SS_Flowchart';

	public function getEditForm($id = null, $fields = null){
		$form = parent::getEditForm($id, $fields);
		$gridField = $form->Fields()->fieldByName($this->sanitiseClassName($this->modelClass));
		$config = $gridField->getConfig();

		if($this->sanitiseClassName($this->modelClass) == "FlowchartPage"){
			$config->removeComponentsByType('GridFieldDetailForm');
			$config->removeComponentsByType('GridFieldAddNewButton');
			$config->addComponent(new GridFieldFlowchartDetailForm());
		} else if($this->sanitiseClassName($this->modelClass) == "FlowState"){
			$config->getComponentByType('GridFieldDataColumns')->setDisplayFields(
				singleton($this->sanitiseClassName($this->modelClass))->getCurrentDisplayFields()
			);
		}
		return $form;
{'fraction_non_alphanumeric': 0.15032967032967032, 'fraction_numerical': 0.0, 'mean_word_length': 6.741496598639456, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 36, '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': '4986401', 'n_tokens_mistral': 711, 'n_tokens_neox': 651, 'n_words': 118}