protected function exportJsonAddExtras($debug_opts, array $machine_graph): array
	{
		if (!empty($this->state_diagram_extras_json)) {
			$graph = $this->state_diagram_extras_json;
			if (!isset($graph['layout'])) {
				$graph['layout'] = 'row';
				$graph['layoutOptions'] = [
					'align' => 'top',
				];
			}
			if (!isset($graph['nodes'])) {
				$graph['nodes'] = [];
			}
			if (!isset($graph['edges'])) {
				$graph['edges'] = [];
			}
			array_unshift($graph['nodes'], [
					'id' => 'smalldb',
					'label' => $this->machine_type,
					'graph' => $machine_graph,
					'color' => '#aaa',
					'x' => 0,
					'y' => 0,
				]);
			return $graph;
		} else {
			return $machine_graph;
		}
	}
protected function exportJsonAddExtras($debug_opts, array $machine_graph): array
	{
		if (!empty($this->state_diagram_extras_json)) {
			$graph = $this->state_diagram_extras_json;
			if (!isset($graph['layout'])) {
				$graph['layout'] = 'row';
				$graph['layoutOptions'] = [
					'align' => 'top',
				];
			}
			if (!isset($graph['nodes'])) {
				$graph['nodes'] = [];
			}
			if (!isset($graph['edges'])) {
				$graph['edges'] = [];
			}
			array_unshift($graph['nodes'], [
					'id' => 'smalldb',
					'label' => $this->machine_type,
					'graph' => $machine_graph,
					'color' => '#aaa',
					'x' => 0,
					'y' => 0,
				]);
			return $graph;
		} else {
			return $machine_graph;
		}
	}
protected function exportJsonAddExtras ( $ debug_opts , array $ machine_graph ) : array { if ( ! empty ( $ this -> state_diagram_extras_json ) ) { $ graph = $ this -> state_diagram_extras_json ; if ( ! isset ( $ graph [ 'layout' ] ) ) { $ graph [ 'layout' ] = 'row' ; $ graph [ 'layoutOptions' ] = [ 'align' => 'top' , ] ; } if ( ! isset ( $ graph [ 'nodes' ] ) ) { $ graph [ 'nodes' ] = [ ] ; } if ( ! isset ( $ graph [ 'edges' ] ) ) { $ graph [ 'edges' ] = [ ] ; } array_unshift ( $ graph [ 'nodes' ] , [ 'id' => 'smalldb' , 'label' => $ this -> machine_type , 'graph' => $ machine_graph , 'color' => '#aaa' , 'x' => 0 , 'y' => 0 , ] ) ; return $ graph ; } else { return $ machine_graph ; } }
Add extra diagram features into the diagram.

Extend this method to add debugging visualizations.

@see AbstractMachine::exportJson().
@see https://grafovatko.smalldb.org/

@param mixed $debug_opts Machine-specific Options to configure visible
debug data.
@param array $machine_graph Smalldb state chart wrapped in a 'smalldb' node.
Add extra diagram features into the diagram .