I have a custom asset bundle defined in my plugin. My plugin has a controller. The controller has a action:
/**
* Handle a request going to our plugin's index action URL,
* e.g.: actions/entries-by-group/entries-by-group
*
* @return mixed
* @throws \yii\base\InvalidConfigException
*/
public function actionIndex()
{
$this->view->registerAssetBundle(EntriesByGroupAssets::class);
$result = 'Welcome to the EntriesByGroupController actionIndex() method';
return $result;
}
As you can see, I am trying to register my asset bundle. I am getting the error:
ReflectionException
Class recoveryfinder\entriesbygroup\assets\EntriesByGroupAssets does not exist
My namespaces are:
namespace recoveryfinder\entriesbygroup\controller;
or in the asset bundle file:
namespace recoveryfinder\entriesbygroup\assets;
My plugin is in a folder called (note the hyphens):
vendor\recoveryfinder\entries-by-group\src\controllers\EntriesByGroupController.php
It seems that when code gets to ClassLoader::LoadClass I get the error referenced above - class does not exist. It looks to me like ClassLoader is using the namespace as the path spec (without the hyphens) rather than the actual location (with the hyphens).
I must need to set paths in my plugin? If not what is wrong here?