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

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

Sets the endpoint URL that will be passed to templates when rendering html & scripts.
public endpoint ( $endpoint_url )
$endpoint_url
    public function endpoint($endpoint_url)
    {
        $this->endpointURL = $endpoint_url;
        return $this;
    }

Usage Example

Пример #1
0
 public function testEndpoint()
 {
     $this->viewFactory->shouldReceive('make')->withArgs(['fooTable', ['columns' => ['id' => 'id'], 'showHeaders' => false, 'id' => 'fooBar', 'endpoint' => '/test/endpoint/gets/set']])->times(1)->andReturn($this->view);
     $this->viewFactory->shouldReceive('make')->withArgs(['fooScript', ['id' => 'fooBar', 'columns' => ['id' => 'id'], 'options' => [], 'callbacks' => [], 'endpoint' => '/test/endpoint/gets/set']])->times(1)->andReturn($this->view);
     $this->dtv2->endpoint('/test/endpoint/gets/set');
     $this->dtv2->html();
 }