Custom Attribute Namespace
Permalink
This is driving me nuts: I want to install a custom attribute type from my package controller, but whatever I try, the class (which is a clone of the number type attribute) is not found. I know the file is getting included because I can cause a parse error by making a typo, yet the package upgrade consistently produces an exception:
Class \Concrete\Package\Jero\Attribute\Organisation\Controller does not exist
My package controller:
My attribute controller:
packages/jero/src/Jero/attributes/organisation/controller.php:
Can anyone illuminate me as to why the class isn't found?
Class \Concrete\Package\Jero\Attribute\Organisation\Controller does not exist
My package controller:
namespace Concrete\Package\Jero; use Concrete\Core\User\Group\Group; use Package; use Loader; use \Concrete\Core\Attribute\Key\Category as AttributeKeyCategory; use \Concrete\Core\Attribute\Type as AttributeType; use Jero\Attribute\Organisation; class Controller extends Package { protected $pkgHandle = 'jero'; protected $appVersionRequired = '5.7.5.1'; protected $pkgVersion = '0.1'; protected $pkgAutoloaderRegistries = array( 'src/Jero/Attributes/Organisation' => '\Jero\Attribute\Organisation' ); public function upgrade () {
Viewing 15 lines of 26 lines. View entire code block.
My attribute controller:
packages/jero/src/Jero/attributes/organisation/controller.php:
namespace Jero\Attribute\Organisation; use Loader; use \Concrete\Core\Foundation\Object; use \Concrete\Core\Attribute\Controller as AttributeTypeController; class Controller extends AttributeTypeController { snip.... }
Can anyone illuminate me as to why the class isn't found?