Ublaboo/datagrid – nejde mi zprovoznit

iru
Člen | 113
+
+1
-

Zdravím, již nějakou dobu se potýkám s tím, jak zprovoznit Ublaboo/datagrid a stále mi to nejde…

podařilo se mi ji nainstalovat

Composer:

"name": "nette/web-project",
	"description": "Nette: Standard Web Project",
	"keywords": ["nette"],
	"type": "project",
	"license": ["MIT", "BSD-3-Clause", "GPL-2.0", "GPL-3.0"],
	"require": {
		"php": ">= 8.0",
		"latte/latte": "^3.0",
		"nette/application": "^3.1",
		"nette/bootstrap": "^3.2",
		"nette/caching": "^3.2 || ^4.0",
		"nette/database": "^3",
		"nette/di": "^3.1",
		"nette/forms": "^3",
		"nette/http": "^3",
		"nette/mail": "^4.0",
		"nette/php-generator": "^4.0",
		"nette/robot-loader": "^4.0",
		"nette/safe-stream": "^3.0",
		"nette/security": "^3",
		"nette/utils": "^4.0",
		"tracy/tracy": "^2.10 || ^3.0",
		"nextras/datagrid": "^2.0",
		"ublaboo/datagrid": "^6.9"
	},
	"require-dev": {
		"nette/tester": "^2.0"
	},

Presenter:

use Ublaboo\DataGrid\DataGrid;


  public function createComponentSimpleGrid($name)
    {
        $grid = new Datagrid($this, $name);

        $grid->setDataSource($this->database->table('s_semena'));
        $grid->addColumnText('name', 'Name');

        return $grid;
    }

V šabloně

 {control simpleGrid}

Laděnka hlásí chybu:

Class „Ublaboo\DataGrid\DataGrid“ not found

Můžete mi prosím někdo poradit?

Moc děkuji

ViPEr*CZ*
Člen | 820
+
+1
-

No ano… idealni se mrknout do kodu… nebo to pisou i tady

https://github.com/…ocs/index.md

Ten namespace je spatne. Nove to je use Contributte\Datagrid\Datagrid;

Najit se to treba da takto: https://packagist.org/…boo/datagrid

iru
Člen | 113
+
0
-

ViPErCZ napsal(a):

No ano… idealni se mrknout do kodu… nebo to pisou i tady

https://github.com/…ocs/index.md

Ten namespace je spatne. Nove to je use Contributte\Datagrid\Datagrid;

Najit se to treba da takto: https://packagist.org/…boo/datagrid

Díky, tak jsem to změnila a provedla i composer update, ale stejně dostávám chybu: Class „Contributte\Datagrid\Datagrid“ not found

PS: Není mi jasné, proč se z namespace načítá „Contributte“, když datagrid je ve vendor ve složce „ublaboo“?
https://ctrlv.cz/Wm1F

Composer po aktualizaci:

"name": "nette/web-project",
	"description": "Nette: Standard Web Project",
	"keywords": ["nette"],
	"type": "project",
	"license": ["MIT", "BSD-3-Clause", "GPL-2.0", "GPL-3.0"],
	"require": {
		"php": ">= 8.0",
		"latte/latte": "^3.0",
		"nette/application": "^3.1",
		"nette/bootstrap": "^3.2",
		"nette/caching": "^3.2 || ^4.0",
		"nette/database": "^3",
		"nette/di": "^3.1",
		"nette/forms": "^3",
		"nette/http": "^3",
		"nette/mail": "^4.0",
		"nette/php-generator": "^4.0",
		"nette/robot-loader": "^4.0",
		"nette/safe-stream": "^3.0",
		"nette/security": "^3",
		"nette/utils": "^4.0",
		"tracy/tracy": "^2.10 || ^3.0",
		"ublaboo/datagrid": "^6.10"
	},
	"require-dev": {
		"nette/tester": "^2.0"
	},
	"autoload": {
		"psr-4": {
			"App\\": "app/"
		}
	}

Editoval iru (Dnes 12:56)

iru
Člen | 113
+
0
-

iru napsal(a):

ViPErCZ napsal(a):

No ano… idealni se mrknout do kodu… nebo to pisou i tady

https://github.com/…ocs/index.md

Ten namespace je spatne. Nove to je use Contributte\Datagrid\Datagrid;

Najit se to treba da takto: https://packagist.org/…boo/datagrid

Díky, tak jsem to změnila a provedla i composer update, ale stejně dostávám chybu: Class „Contributte\Datagrid\Datagrid“ not found

PS: Není mi jasné, proč se z namespace načítá „Contributte“, když datagrid je ve vendor ve složce „ublaboo“?
https://ctrlv.cz/Wm1F

Composer po aktualizaci:

"name": "nette/web-project",
	"description": "Nette: Standard Web Project",
	"keywords": ["nette"],
	"type": "project",
	"license": ["MIT", "BSD-3-Clause", "GPL-2.0", "GPL-3.0"],
	"require": {
		"php": ">= 8.0",
		"latte/latte": "^3.0",
		"nette/application": "^3.1",
		"nette/bootstrap": "^3.2",
		"nette/caching": "^3.2 || ^4.0",
		"nette/database": "^3",
		"nette/di": "^3.1",
		"nette/forms": "^3",
		"nette/http": "^3",
		"nette/mail": "^4.0",
		"nette/php-generator": "^4.0",
		"nette/robot-loader": "^4.0",
		"nette/safe-stream": "^3.0",
		"nette/security": "^3",
		"nette/utils": "^4.0",
		"tracy/tracy": "^2.10 || ^3.0",
		"ublaboo/datagrid": "^6.10"
	},
	"require-dev": {
		"nette/tester": "^2.0"
	},
	"autoload": {
		"psr-4": {
			"App\\": "app/"
		}
	}

Už se to podařilo, nakonec to funguje s „use Ublaboo\DataGrid\DataGrid;“ po aktualizaci komponenty uplaboo/datagrid na verzi 6.10