[Copy] #338 updated code style in CreationPolicy
This commit is contained in:
@@ -27,23 +27,19 @@ define(
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A policy for determining whether objects of a certain type can be
|
* A policy for determining whether objects of a given type can be
|
||||||
* created.
|
* created.
|
||||||
* @returns {{allow: Function}}
|
|
||||||
* @constructor
|
* @constructor
|
||||||
|
* @implements {Policy}
|
||||||
|
* @memberof platform/commonUI/browse
|
||||||
*/
|
*/
|
||||||
function CreationPolicy() {
|
function CreationPolicy() {
|
||||||
return {
|
|
||||||
/**
|
|
||||||
* Only allow creation of object types that have the
|
|
||||||
* Creation capability
|
|
||||||
*/
|
|
||||||
allow: function (type) {
|
|
||||||
return type.hasFeature("creation");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CreationPolicy.prototype.allow = function (type) {
|
||||||
|
return type.hasFeature("creation");
|
||||||
|
};
|
||||||
|
|
||||||
return CreationPolicy;
|
return CreationPolicy;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
Reference in New Issue
Block a user