OpenSkill\Datatable\Views\DatatableView::table PHP Метод

table() публичный Метод

Will render the table
public table ( ) : string
Результат string the rendered view that represents the table
    public function table()
    {
        if (empty($this->columns)) {
            throw new \InvalidArgumentException("There are no columns defined");
        }
        return $this->viewFactory->make($this->tableView, ['columns' => $this->columns, 'showHeaders' => $this->printHeaders, 'id' => $this->tableId, 'endpoint' => $this->endpointURL])->render();
    }

Usage Example

Пример #1
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testInvalidColumsTable()
 {
     $this->dtv->table();
 }