1 | <?php |
||
24 | class WorkflowsReportController extends ControllerBase { |
||
25 | |||
26 | /** |
||
27 | * The workflow storage. |
||
28 | * |
||
29 | * @var \Drupal\Core\Config\Entity\ConfigEntityStorageInterface |
||
30 | */ |
||
31 | public $storage; |
||
32 | |||
33 | /** |
||
34 | * WorkflowsReportController constructor. |
||
35 | * |
||
36 | * @param \Drupal\Core\Config\Entity\ConfigEntityStorageInterface $storage |
||
37 | * The workflow storage. |
||
38 | */ |
||
39 | public function __construct(ConfigEntityStorageInterface $storage) { |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public static function create(ContainerInterface $container) { |
||
54 | |||
55 | /** |
||
56 | * Count transitions, fonts, sinks, and islands in a workflow. |
||
57 | * |
||
58 | * @param \Drupal\workflows\Entity\Workflow $workflow |
||
59 | * The workflow to examine. |
||
60 | * |
||
61 | * @return array |
||
62 | * An information hash. |
||
63 | */ |
||
64 | public static function getConnectivity(Workflow $workflow) { |
||
88 | |||
89 | /** |
||
90 | * Build an information summary for all workflows. |
||
91 | * |
||
92 | * @param array $workflows |
||
93 | * An array of Workflow entities to check. |
||
94 | * |
||
95 | * @return array |
||
96 | * A summary information hash, keyed and ordered by id. |
||
97 | */ |
||
98 | public function getWorkflowSummary(array $workflows) { |
||
116 | |||
117 | /** |
||
118 | * Build a table cell from a value, using the qa/results library classes. |
||
119 | * |
||
120 | * Assumes the cell is to be used within a ".qa-results" CSS element. |
||
121 | * |
||
122 | * @param array $workflow |
||
123 | * An information array about a workflow. |
||
124 | * @param string $key |
||
125 | * The string to extract from the information array. |
||
126 | * |
||
127 | * @return array |
||
128 | * A table cell array. |
||
129 | */ |
||
130 | protected function buildControlCell($workflow, $key) { |
||
138 | |||
139 | /** |
||
140 | * Build a table from a workflow summary analysis. |
||
141 | * |
||
142 | * @param array $list |
||
143 | * A workflow summary analysis, from ::getWorkflowSummary(). |
||
144 | * |
||
145 | * @return array |
||
146 | * A render array for the table. |
||
147 | */ |
||
148 | protected function build(array $list) { |
||
181 | |||
182 | /** |
||
183 | * Report on existing workflows. |
||
184 | * |
||
185 | * @return array |
||
186 | * The render array for the controller. |
||
187 | */ |
||
188 | public function report() { |
||
195 | |||
196 | } |
||
197 |