ajaxUrl = $ajaxUrl; $this->ajaxMethod = $ajaxMethod; } /** * @param DataTableInterface $table * * @throws DataTableExceptionInterface * * @return void */ public function modifyTable(DataTableInterface $table) { $table->getOptions()->setOption('rowDetails', [ 'ajax' => [ 'url' => $this->ajaxUrl, 'method' => $this->ajaxMethod, 'data' => $this->ajaxParams, ], ]); // Detail-Spalte erzeugen $newCol = Column::fixed('details', '', 'center', '20px'); $newCol->setFormatter(ColumnFormatter::template('')); $newCol->addCssClass('dt-details'); // Detail-Spalte vor erste Spalte einfügen /** @var Column $firstCol */ $firstCol = $table->getColumns()->getByIndex(0); $table->getColumns()->addBefore($newCol, $firstCol->getName()); } }