diff --git a/src/ZfcDatagrid/DataSource/AbstractDataSource.php b/src/ZfcDatagrid/DataSource/AbstractDataSource.php index 6bb04043..c11bdd28 100644 --- a/src/ZfcDatagrid/DataSource/AbstractDataSource.php +++ b/src/ZfcDatagrid/DataSource/AbstractDataSource.php @@ -141,4 +141,17 @@ public function getPaginatorAdapter() { return $this->paginatorAdapter; } + + /** + * Get the data back from construct + * @return mixed + */ + abstract public function getData(); + + /** + * Execute the query and set the paginator + * - with sort statements + * - with filters statements + */ + abstract public function execute(); } diff --git a/src/ZfcDatagrid/Renderer/AbstractRenderer.php b/src/ZfcDatagrid/Renderer/AbstractRenderer.php index 19f13558..15d7e421 100644 --- a/src/ZfcDatagrid/Renderer/AbstractRenderer.php +++ b/src/ZfcDatagrid/Renderer/AbstractRenderer.php @@ -14,8 +14,16 @@ abstract class AbstractRenderer implements RendererInterface { + /** + * + * @var array + */ protected $options = []; + /** + * + * @var string + */ protected $title; /** @@ -700,4 +708,30 @@ public function prepareViewModel(Datagrid $grid) $viewModel->setVariable('exportRenderers', $grid->getExportRenderers()); } + + /** + * Return the name of the renderer + * @return string + */ + abstract public function getName(); + + /** + * Determine if the renderer is for export + * @return boolean + */ + abstract public function isExport(); + + /** + * Determin if the renderer is HTML + * It can be export + html -> f.x. + * printing for HTML + * @return boolean + */ + abstract public function isHtml(); + + /** + * Execute all... + * @return ViewModel Response\Stream + */ + abstract public function execute(); }