Skip to content

Loading…

Update libs/NiftyGrid/Grid.php #31

Open
wants to merge 1 commit into from

2 participants

@vanam

Add support for changing paginator template path

@vanam vanam Update libs/NiftyGrid/Grid.php
Add support for changing paginator template path
1d792d2
@j3nda

hello,

well, this is not necessary, because you can override by:

class Grid extends \NiftyGrid\Grid {
protected function createComponentPaginator() {
return new GridPaginator(DIR.'/templates/paginator.latte');
}
}

and this solution si better in OOP way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 2, 2012
  1. @vanam

    Update libs/NiftyGrid/Grid.php

    vanam committed
    Add support for changing paginator template path
Showing with 11 additions and 0 deletions.
  1. +11 −0 libs/NiftyGrid/Grid.php
View
11 libs/NiftyGrid/Grid.php
@@ -77,6 +77,9 @@
/** @var string */
protected $templatePath;
+
+ /** @var string */
+ protected $paginatorTemplatePath;
/** @var string */
public $messageNoRecords = 'Žádné záznamy';
@@ -977,4 +980,12 @@ public function getTranslator()
return null;
}
+
+ /**
+ * Sets paginator template path
+ * @param string $pagiantorTemplatePath
+ */
+ public function setPaginatorTemplate($pagiantorTemplatePath){
+ $this->paginatorTemplatePath = $pagiantorTemplatePath;
+ }
}
Something went wrong with that request. Please try again.