<?php
//Trying to avoid
/*
Class RainLab\User\Controllers\Users has already been extended with Backend\Behaviors\RelationController
/home/kurt/www/october/vendor/october/rain/src/Extension/ExtendableTrait.php line 133
*/
//by doing
UsersController::extend(function (UsersController $controller) { // type hint for IDE mostly, but it's nice to type hint
if (!in_array('Backend.Behaviors.RelationController', $controller->implement)) { // check if that behavior is in public $implement variable already?
$controller->implement[] = 'Backend.Behaviors.RelationController'; // if it's not, add this behavior
$controller->relationConfig = []; // RelationController behavior will crash if public $relationConfig is not set, use your desired configuration here
}
});
?>