OpenSkill\Datatable\Datatable::view PHP 메소드

view() 공개 메소드

The user is responsible to populate the view with the wished columns, because they can not be derived from the server side column configuration.
public view ( string $tableView = null, string $scriptView = null ) : DatatableView
$tableView string the name of the table view to render
$scriptView string the name of the script view to render
리턴 OpenSkill\Datatable\Views\DatatableView the view to work with
    public function view($tableView = null, $scriptView = null)
    {
        if (is_null($tableView)) {
            $tableView = $this->versionEngine->getVersion()->tableView();
        }
        if (is_null($scriptView)) {
            $scriptView = $this->versionEngine->getVersion()->scriptView();
        }
        return new DatatableView($tableView, $scriptView, $this->viewFactory, $this->configRepository, []);
    }

Usage Example

예제 #1
0
 /**
  * Will test if a new ColumnComposer will be instantiated correctly
  */
 public function testViewConstruction()
 {
     $versionEngine = Mockery::mock('OpenSkill\\Datatable\\Versions\\VersionEngine');
     $versionEngine->shouldReceive('getVersion')->andReturn();
     $dt = new Datatable($versionEngine);
     $dtv = $dt->view();
 }
All Usage Examples Of OpenSkill\Datatable\Datatable::view