I like to build a Plugin where Frontend User belongsTo BackendUser ( One to Many Relation ). For the backend User i want to display an partial with Relation Manager to add many Frontend Users to BackendUser. If i try dynamically define a property on Plugin.php like:
use Backend\Models\User as BackendUser;
use Backend\Controllers\Users as BackendUsersController;
public function boot(){
BackendUsersController::extend(function($controller) {
$controller->implement[] = 'Backend.Behaviors.RelationController';
$controller->relationConfig = '$/plg-user/plg/controllers/plg-ctr/config_relation.yaml'
});
});
i get an Error : Class Backend\Controllers\Users must define property $relationConfig used by Backend\Behaviors\RelationController behavior
If i try to put manually :
public $relationConfig = '$/plg-user/plg/controllers/plg-ctr/config_relation.yaml'
to the Backend\Controllers\Users Controller everything woks.
any Idea ?