/** * @return array */ public function prepareConfig() { $configArray = ['tableId' => $this->getTableIdentifier(), 'class' => $this->tableClass, 'url' => $this->defaultUrl, 'header' => []]; if ($this->getConfiguration() instanceof TableConfiguration) { $configTableArray = ['url' => $this->config->getUrl() === null ? $this->defaultUrl : $this->config->getUrl(), 'header' => $this->config->getHeader(), 'footer' => $this->config->getFooter(), 'order' => $this->getOrders($this->config), 'searchable' => $this->config->getSearchable(), 'sortable' => $this->config->getSortable(), 'pageLength' => $this->config->getPageLength()]; $configArray = array_merge($configArray, $configTableArray); } return $configArray; }