Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / permissions_by_term / js / src / model / backend.prototype.js
diff --git a/web/modules/contrib/permissions_by_term/js/src/model/backend.prototype.js b/web/modules/contrib/permissions_by_term/js/src/model/backend.prototype.js
new file mode 100644 (file)
index 0000000..bcdadcd
--- /dev/null
@@ -0,0 +1,33 @@
+let Backend = function(taxonomyRelationFieldNames = [], tidToUsernames = [], tidToRoles = [], fieldWrapperCSSClasses = []) {
+  this.taxonomyRelationFieldNames = taxonomyRelationFieldNames;
+  this.tidsToRoles = tidToRoles;
+  this.tidToUsernames = tidToUsernames;
+  this.fieldWrapperCSSClasses = fieldWrapperCSSClasses;
+}
+
+/**
+ * @returns object[]
+ */
+Backend.prototype.getTidToUsername = function() {
+  return this.tidToUsernames;
+}
+
+/**
+ * @returns object[]
+ */
+Backend.prototype.getTidToRoles = function() {
+  return this.tidsToRoles;
+}
+
+/**
+ * @returns string[]
+ */
+Backend.prototype.getTaxonomyRelationFieldNames = function() {
+  return this.taxonomyRelationFieldNames;
+}
+
+Backend.prototype.getFieldWrapperCSSClasses = function() {
+  return this.fieldWrapperCSSClasses;
+}
+
+export default Backend;
\ No newline at end of file