private function exportDotRenderGroups($groups, $group_content, $indent = "\t") {
		foreach ($groups as $g => $group) {
			echo $indent, "subgraph ", $this->exportDotIdentifier($g, 'cluster_'), " {\n";
			if (isset($group['label'])) {
				echo $indent, "\t", "label = \"", addcslashes($group['label'], '"'), "\";\n";
			}
			if (!empty($group['color'])) {
				echo $indent, "\t", "color=\"", addcslashes($group['color'], '"'), "\";\n";
				echo $indent, "\t", "fontcolor=\"", addcslashes($group['color'], '"'), "\";\n";
			} else {
				// This cannot be defined globally, since nested groups inherit the settings.
				echo $indent, "\t", "color=\"#666666\";\n";
				echo $indent, "\t", "fontcolor=\"#666666\";\n";
			}
			foreach ($group_content[$g] as $s) {
				echo $indent, "\t", $this->exportDotIdentifier($s), ";\n";
			}
			if (isset($group['groups'])) {
				$this->exportDotRenderGroups($group['groups'], $group_content, "\t".$indent);
			}
			echo $indent, "}\n";
		}
	}
private function exportDotRenderGroups($groups, $group_content, $indent = "\t") {
		foreach ($groups as $g => $group) {
			echo $indent, "subgraph ", $this->exportDotIdentifier($g, 'cluster_'), " {\n";
			if (isset($group['label'])) {
				echo $indent, "\t", "label = \"", addcslashes($group['label'], '"'), "\";\n";
			}
			if (!empty($group['color'])) {
				echo $indent, "\t", "color=\"", addcslashes($group['color'], '"'), "\";\n";
				echo $indent, "\t", "fontcolor=\"", addcslashes($group['color'], '"'), "\";\n";
			} else {
				// This cannot be defined globally, since nested groups inherit the settings.
				echo $indent, "\t", "color=\"#666666\";\n";
				echo $indent, "\t", "fontcolor=\"#666666\";\n";
			}
			foreach ($group_content[$g] as $s) {
				echo $indent, "\t", $this->exportDotIdentifier($s), ";\n";
			}
			if (isset($group['groups'])) {
				$this->exportDotRenderGroups($group['groups'], $group_content, "\t".$indent);
			}
			echo $indent, "}\n";
		}
	}
private function exportDotRenderGroups ( $ groups , $ group_content , $ indent = "\t" ) { foreach ( $ groups as $ g => $ group ) { echo $ indent , "subgraph " , $ this -> exportDotIdentifier ( $ g , 'cluster_' ) , " {\n" ; if ( isset ( $ group [ 'label' ] ) ) { echo $ indent , "\t" , "label = \"" , addcslashes ( $ group [ 'label' ] , '"' ) , "\";\n" ; } if ( ! empty ( $ group [ 'color' ] ) ) { echo $ indent , "\t" , "color=\"" , addcslashes ( $ group [ 'color' ] , '"' ) , "\";\n" ; echo $ indent , "\t" , "fontcolor=\"" , addcslashes ( $ group [ 'color' ] , '"' ) , "\";\n" ; } else { // This cannot be defined globally, since nested groups inherit the settings. echo $ indent , "\t" , "color=\"#666666\";\n" ; echo $ indent , "\t" , "fontcolor=\"#666666\";\n" ; } foreach ( $ group_content [ $ g ] as $ s ) { echo $ indent , "\t" , $ this -> exportDotIdentifier ( $ s ) , ";\n" ; } if ( isset ( $ group [ 'groups' ] ) ) { $ this -> exportDotRenderGroups ( $ group [ 'groups' ] , $ group_content , "\t" . $ indent ) ; } echo $ indent , "}\n" ; } }
Recursively render groups in state machine diagram.
Recursively render groups in state machine diagram .