Add comparison function to MDUserRole

This commit is contained in:
2026-09-04 17:21:46 +02:00
parent d9cfb48584
commit b84964080a
+12
View File
@@ -191,6 +191,18 @@ enum MDUserRole implements MDValueEnumInterface, JsonSerializable {
} }
/**
* Compares the user roles.
*
* @param MDUserRole $compareWith User role to compare with.
*
* @return boolean
*/
public function isLowerThan(MDUserRole $compareWith):bool {
if ($this->toInt() > $compareWith->toInt()) return true;
else return false;
}
/** /**
* Provides the option to serialize as a string during json_encode(). * Provides the option to serialize as a string during json_encode().
* *