$resourceAdmins =
$this->
getResourceAdminRules($role->
getId());
// The admin property is temporary used to flag the passed role as admin role
if ($adminRole instanceof Rule &&
$adminRole->
getRoleId()) { $role->
setAdmin(1
);
} else { $role->
setAdmin(0
);
} } foreach ($resources as $resource) { $data[] =
$this->
getResourceNode($resource,
$role,
$resourceAdmins);
} $this->
View()->
assign([ 'success' => true,
'data' =>
$data,
'count' => \
count($data),
]);
} /**
* Event listener method of the user manager backend module.
* Will be fired when the user clicks the delete action column on a resource node of the rules tree panel.
*/