1818use Grido \Components \Filters \Filter ;
1919use Grido \Components \Actions \Action ;
2020
21+ use Nette \Application \UI \Presenter ;
2122use Symfony \Component \PropertyAccess \PropertyAccessor ;
2223
2324/**
@@ -140,7 +141,6 @@ class Grid extends Components\Container
140141 */
141142 public function __construct ()
142143 {
143- parent ::__construct ();
144144 list ($ parent , $ name ) = func_get_args () + [NULL , NULL ];
145145 if ($ parent !== NULL ) {
146146 $ parent ->addComponent ($ this , $ name );
@@ -701,7 +701,7 @@ public function getCustomization()
701701 * @param array $params
702702 * @internal
703703 */
704- public function loadState (array $ params )
704+ public function loadState (array $ params ): void
705705 {
706706 //loads state from session
707707 $ session = $ this ->getRememberSession ();
@@ -720,10 +720,10 @@ public function loadState(array $params)
720720 * @param \Nette\Application\UI\PresenterComponentReflection $reflection (internal, used by Presenter)
721721 * @internal
722722 */
723- public function saveState (array &$ params , $ reflection = NULL )
723+ public function saveState (array &$ params , $ reflection = NULL ): void
724724 {
725725 !empty ($ this ->onRegistered ) && $ this ->onRegistered ($ this );
726- return parent ::saveState ($ params , $ reflection );
726+ parent ::saveState ($ params , $ reflection );
727727 }
728728
729729 /**
@@ -832,10 +832,9 @@ public function reload()
832832 /**********************************************************************************************/
833833
834834 /**
835- * @return \Nette\Templating\FileTemplate
836835 * @internal
837836 */
838- public function createTemplate ()
837+ public function createTemplate (): \ Nette \ Application \ UI \ ITemplate
839838 {
840839 $ template = parent ::createTemplate ();
841840 $ template ->setFile ($ this ->getCustomization ()->getTemplateFiles ()[Customization::TEMPLATE_DEFAULT ]);
@@ -1029,7 +1028,7 @@ protected function getItemsForCountSelect()
10291028 */
10301029 public function __triggerUserNotice ($ message )
10311030 {
1032- if ($ this ->getPresenter ( FALSE ) && $ session = $ this ->getRememberSession ()) {
1031+ if ($ this ->lookup (Presenter::class, FALSE ) && $ session = $ this ->getRememberSession ()) {
10331032 $ session ->remove ();
10341033 }
10351034
0 commit comments