Utils Class
Module: ember-flexberry
Item Index
Methods
getProjectionByName
(
Object
-
projectionName
-
modelName
-
store
Used for getting projection object by projection name.
Returns:
Object:
Projection by name.
getSizeInUnits
(
Number
-
fileSize
-
fileSizeUnits
Used for convert file size value depending on units.
Parameters:
Returns:
Number:
File size in bytes.
Usage: controllers/my-form.js
import { getRecord } from 'ember-flexberry/utils/file-size-units-converter'
let layer = getSizeInUnits(file.size, 'Mb')
predicateForFilter
(
BasePredicate | Null
-
filter
Builds predicate for filter
Parameters:
-
filter
ObjectObject (
{ name, condition, pattern }
) with parameters for filter.
Returns:
BasePredicate | Null:
Predicate to filter through.
Example:
import { predicateForFilter } from 'ember-flexberry/utils/filter'
predicateForFilter(filter)
runAfter
(
private
-
context
-
condition
-
handler
Runs handler
after condition
is met.