1 | <?php |
||
25 | class GraphPrinter extends ResultPrinter { |
||
26 | |||
27 | //@see https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/4273 |
||
28 | // Implement `ResultPrinterDependency` once SMW 3.1 becomes mandatory |
||
29 | |||
30 | const NODELABEL_DISPLAYTITLE = 'displaytitle'; |
||
31 | public static $NODE_LABELS = [ |
||
32 | self::NODELABEL_DISPLAYTITLE, |
||
33 | ]; |
||
34 | |||
35 | public static $NODE_SHAPES = [ |
||
36 | 'box', |
||
37 | 'box3d', |
||
38 | 'circle', |
||
39 | 'component', |
||
40 | 'diamond', |
||
41 | 'doublecircle', |
||
42 | 'doubleoctagon', |
||
43 | 'egg', |
||
44 | 'ellipse', |
||
45 | 'folder', |
||
46 | 'hexagon', |
||
47 | 'house', |
||
48 | 'invhouse', |
||
49 | 'invtrapezium', |
||
50 | 'invtriangle', |
||
51 | 'Mcircle', |
||
52 | 'Mdiamond', |
||
53 | 'Msquare', |
||
54 | 'Mrecord', |
||
55 | 'none', |
||
56 | 'note', |
||
57 | 'octagon', |
||
58 | 'parallelogram', |
||
59 | 'pentagon ', |
||
60 | 'plaintext', |
||
61 | 'point', |
||
62 | 'polygon', |
||
63 | 'rect', |
||
64 | 'record', |
||
65 | 'rectangle', |
||
66 | 'septagon', |
||
67 | 'square', |
||
68 | 'tab', |
||
69 | 'trapezium', |
||
70 | 'triangle', |
||
71 | 'tripleoctagon', |
||
72 | ]; |
||
73 | |||
74 | public static $ARROW_SHAPES = [ |
||
75 | 'box', |
||
76 | 'crow', |
||
77 | 'curve', |
||
78 | 'icurve', |
||
79 | 'diamond', |
||
80 | 'dot', |
||
81 | 'inv', |
||
82 | 'none', |
||
83 | 'normal', |
||
84 | 'tee', |
||
85 | 'vee', |
||
86 | ]; |
||
87 | |||
88 | private $nodes = []; |
||
89 | private $options; |
||
90 | |||
91 | public function getName() { |
||
94 | |||
95 | /** |
||
96 | * @see SMWResultPrinter::handleParameters() |
||
97 | */ |
||
98 | protected function handleParameters( array $params, $outputmode ) { |
||
103 | |||
104 | /** |
||
105 | * @see ResultPrinterDependency::hasMissingDependency |
||
106 | * |
||
107 | * {@inheritDoc} |
||
108 | */ |
||
109 | public function hasMissingDependency() { |
||
112 | |||
113 | /** |
||
114 | * @see ResultPrinterDependency::getDependencyError |
||
115 | * |
||
116 | * {@inheritDoc} |
||
117 | */ |
||
118 | public function getDependencyError() { |
||
127 | |||
128 | /** |
||
129 | * @param SMWQueryResult $res |
||
130 | * @param $outputmode |
||
131 | * |
||
132 | * @return string |
||
133 | */ |
||
134 | protected function getResultText( SMWQueryResult $res, $outputmode ) { |
||
159 | |||
160 | /** |
||
161 | * Process a result row and create SRF\GraphNodes |
||
162 | * |
||
163 | * @since 3.1 |
||
164 | * |
||
165 | * @param array $row |
||
166 | * |
||
167 | */ |
||
168 | protected function processResultRow( array /* of SMWResultArray */ $row ) { |
||
190 | |||
191 | /** |
||
192 | * @see SMWResultPrinter::getParamDefinitions |
||
193 | * |
||
194 | * @since 1.8 |
||
195 | * |
||
196 | * @param $definitions array of IParamDefinition |
||
197 | * |
||
198 | * @return array of IParamDefinition|array |
||
199 | */ |
||
200 | public function getParamDefinitions( array $definitions ) { |
||
281 | } |
||
282 |