C5-8.4* Class not found
Permalink
Following this for v8.4.0:
https://documentation.concrete5.org/developers/packages/adding-custo...
package controller:
Dashboard page controller:
ItemList.php in src/MyPackageClasses/Item/:
It throws an error: 'Class 'MyPackageClasses\Item\ItemList' not found' at the Items Dashboard controller line '$items = new MyItemsList();'.
What's wrong here?
https://documentation.concrete5.org/developers/packages/adding-custo...
package controller:
use MyPackageClasses\Utilities\Installer; public function getEntityManagerProvider() { $provider = new StandardPackageProvider($this->app, $this, [ 'src/MyPackageClasses' => '\MyPackageClasses' ]); return $provider; }
Dashboard page controller:
<?php use MyPackageClasses\Item\ItemList as MyItemList; class Cars extends DashboardPageController { public function view($gID=null){ $items = new MyItemList();
ItemList.php in src/MyPackageClasses/Item/:
<?php namespace MyPackageClasses\Item; class ItemList extends AttributedItemList {
It throws an error: 'Class 'MyPackageClasses\Item\ItemList' not found' at the Items Dashboard controller line '$items = new MyItemsList();'.
What's wrong here?
to
fixed it.
I noticed some write use \Concrete... and other omit the '\'. Some even include it in one line and omit it right on the next line.
Is the back slash important?