Skip to main content
deleted 48 characters in body; deleted 20 characters in body; deleted 20 characters in body
Source Link
Robin Schambach
  • 19.8k
  • 1
  • 20
  • 45

The autoloader won't load files in the folder assets as already stated it is all explained here. Your asset bundles should be in a folder called resources otherwise Yii won't register them in its classmap automatically.

Your namespaces must represent your folder structure. The namespace recoveryfinder\entriesbygroup\controllerns\prefix\controller must be for a file in vendor\recoveryfinder\entriesbygroup\controllervendor\ns\prefix\src\controller so your namespace recoveryfinder\entriesbygroup\assetsns\prefix\assets will search for a file in ...vendor\recoveryfinder\entriesbygroup\assetsvendor\ns\prefix\src\assets but you have to include the resource on your own via require_once since Yii won't so it because you are in the wrong folder

The easiest solution would be to create a folder resources and use the namespace recoveryfinder\entriesbygroup\resourcesns\prefix\src\resources

Or you can - like stated in the docs - use your plugin root path as well recoveryfinder\entriesbygroup

The autoloader won't load files in the folder assets as already stated it is all explained here. Your asset bundles should be in a folder called resources otherwise Yii won't register them in its classmap automatically.

Your namespaces must represent your folder structure. The namespace recoveryfinder\entriesbygroup\controller must be for a file in vendor\recoveryfinder\entriesbygroup\controller so your namespace recoveryfinder\entriesbygroup\assets will search for a file in ...vendor\recoveryfinder\entriesbygroup\assets but you have to include the resource on your own via require_once since Yii won't so it because you are in the wrong folder

The easiest solution would be to create a folder resources and use the namespace recoveryfinder\entriesbygroup\resources

Or you can - like stated in the docs - use your plugin root path as well recoveryfinder\entriesbygroup

The autoloader won't load files in the folder assets as already stated it is all explained here. Your asset bundles should be in a folder called resources otherwise Yii won't register them in its classmap automatically.

Your namespaces must represent your folder structure. The namespace ns\prefix\controller must be for a file in vendor\ns\prefix\src\controller so your namespace ns\prefix\assets will search for a file in ...vendor\ns\prefix\src\assets but you have to include the resource on your own via require_once since Yii won't so it because you are in the wrong folder

The easiest solution would be to create a folder resources and use the namespace ns\prefix\src\resources

Or you can - like stated in the docs - use your plugin root path as well recoveryfinder\entriesbygroup

Source Link
Robin Schambach
  • 19.8k
  • 1
  • 20
  • 45

The autoloader won't load files in the folder assets as already stated it is all explained here. Your asset bundles should be in a folder called resources otherwise Yii won't register them in its classmap automatically.

Your namespaces must represent your folder structure. The namespace recoveryfinder\entriesbygroup\controller must be for a file in vendor\recoveryfinder\entriesbygroup\controller so your namespace recoveryfinder\entriesbygroup\assets will search for a file in ...vendor\recoveryfinder\entriesbygroup\assets but you have to include the resource on your own via require_once since Yii won't so it because you are in the wrong folder

The easiest solution would be to create a folder resources and use the namespace recoveryfinder\entriesbygroup\resources

Or you can - like stated in the docs - use your plugin root path as well recoveryfinder\entriesbygroup