문제

I've got a module that I've created just for the sole purpose of sharing .inc files between multiple modules. The modules .module file is empty, as it doesn't do anything. But in the modules .info file I have included:

files[] = includes\Permissions.inc
files[] = includes\Roles.inc
files[] = includes\PermissionsInterface.inc
files[] = includes\RolesInterface.inc

And then in a module that is using these files (a different module), I have included:

use Portal\Permissions;
use Portal\Roles;

$permissions = new Permissions\Permissions();
$roles = new Roles\Roles();

I don't have any include or require statements, because I thought that was covered by the files[] declaration in the shared modules .info file.

However, I'm getting a PHP error that it can't find the class Permissions(). Just wondering what I'm doing wrong?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 drupal.stackexchange
scroll top