@@ 64-82 (lines=19) @@ | ||
61 | return $g; |
|
62 | } |
|
63 | ||
64 | protected function buildRow(string $stateId, array $transList) { |
|
65 | $states = $this->getStates(); |
|
66 | $trans = $this->getTrans(); |
|
67 | $row = ["${states[$stateId]}\n${stateId}"]; |
|
68 | foreach ($transList as $from => $transIds) { |
|
69 | $cellArray = []; |
|
70 | foreach ($transIds as $transId) { |
|
71 | assert($trans[$transId]['from'] = $stateId); |
|
72 | $transLabel = $trans[$transId]['label']; |
|
73 | } |
|
74 | $cellArray[] = $transLabel; |
|
75 | $cellArray[] = $transId; |
|
76 | $cellArray[] = ""; |
|
77 | $cell = implode("\n", $cellArray); |
|
78 | $row[$trans[$transId]['to']] = $cell; |
|
79 | } |
|
80 | ||
81 | return $row; |
|
82 | } |
|
83 | ||
84 | public static function create(ContainerInterface $container) { |
|
85 | /** @var EntityTypeManagerInterface $etm */ |
@@ 42-60 (lines=19) @@ | ||
39 | return $grid; |
|
40 | } |
|
41 | ||
42 | protected function buildRow(string $stateId, array $transList) { |
|
43 | $states = $this->getStates(); |
|
44 | $trans = $this->getTrans(); |
|
45 | $row = ["${states[$stateId]}\n${stateId}"]; |
|
46 | foreach ($transList as $from => $transIds) { |
|
47 | $cellArray = []; |
|
48 | foreach ($transIds as $transId) { |
|
49 | assert($trans[$transId]['from'] = $stateId); |
|
50 | $transLabel = $trans[$transId]['label']; |
|
51 | } |
|
52 | $cellArray[] = $transLabel; |
|
53 | $cellArray[] = $transId; |
|
54 | $cellArray[] = ""; |
|
55 | $cell = implode("\n", $cellArray); |
|
56 | $row[$trans[$transId]['to']] = $cell; |
|
57 | } |
|
58 | ||
59 | return $row; |
|
60 | } |
|
61 | ||
62 | public function getDuplicateTransLabels() { |
|
63 | $labels = []; |