Code Duplication    Length = 13-14 lines in 2 locations

src/ZfcDatagrid/Renderer/BootstrapTable/View/Helper/TableRow.php 1 location

@@ 168-180 (lines=13) @@
165
                }
166
            }
167
168
            if ($col instanceof Column\Action) {
169
                /* @var $col Column\Action */
170
                $actions = [];
171
                foreach ($col->getActions() as $action) {
172
                    /* @var $action Column\Action\AbstractAction */
173
                    if ($action->isDisplayed($row) === true) {
174
                        $action->setTitle($this->translate($action->getTitle()));
175
                        $actions[] = $action->toHtml($row);
176
                    }
177
                }
178
179
                $value = implode(' ', $actions);
180
            }
181
182
            // "rowClick" action
183
            if ($col instanceof Column\Select && $rowClickAction instanceof AbstractAction

src/ZfcDatagrid/Renderer/JqGrid/Renderer.php 1 location

@@ 210-223 (lines=14) @@
207
            foreach ($this->getColumns() as $column) {
208
                if ($column instanceof Column\Select) {
209
                    // $row[$column->getUniqueId()] = nl2br($row[$column->getUniqueId()], true);
210
                } elseif ($column instanceof Column\Action) {
211
                    /* @var $column \ZfcDatagrid\Column\Action */
212
213
                    $actions = [];
214
                    foreach ($column->getActions() as $action) {
215
                        /* @var $action \ZfcDatagrid\Column\Action\AbstractAction */
216
                        if ($action->isDisplayed($row) === true) {
217
                            $action->setTitle($this->translate($action->getTitle()));
218
                            $actions[] = $action->toHtml($row);
219
                        }
220
                    }
221
222
                    $row[$column->getUniqueId()] = implode(' ', $actions);
223
                } elseif ($column instanceof Column\Action\Icon) {
224
                    $row[$column->getUniqueId()] = $column->getIconClass();
225
                }
226
            }