mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
45 lines
1.2 KiB
Markdown
45 lines
1.2 KiB
Markdown
|
|
## cfs-collection-filters Public API ##
|
||
|
|
|
||
|
|
CollectionFS, adds FS.Collection filters
|
||
|
|
|
||
|
|
_API documentation automatically generated by [docmeteor](https://github.com/raix/docmeteor)._
|
||
|
|
|
||
|
|
-
|
||
|
|
|
||
|
|
### <a name="FS.Collection.prototype.filters"></a>*fsCollection*.filters(filters) <sub><i>Anywhere</i></sub> ###
|
||
|
|
|
||
|
|
*This method __filters__ is defined in `prototype` of `FS.Collection`*
|
||
|
|
|
||
|
|
__Arguments__
|
||
|
|
|
||
|
|
* __filters__ *{Object}*
|
||
|
|
|
||
|
|
File filters for this collection.
|
||
|
|
|
||
|
|
|
||
|
|
__Returns__ *{undefined}*
|
||
|
|
|
||
|
|
|
||
|
|
> ```FS.Collection.prototype.filters = function fsColFilters(filters) { ...``` [filters.js:7](filters.js#L7)
|
||
|
|
|
||
|
|
|
||
|
|
-
|
||
|
|
|
||
|
|
### <a name="FS.Collection.prototype.allowsFile"></a>*fsCollection*.allowsFile() <sub><i>Anywhere</i></sub> ###
|
||
|
|
|
||
|
|
*This method __allowsFile__ is defined in `prototype` of `FS.Collection`*
|
||
|
|
|
||
|
|
__Returns__ *{boolean}*
|
||
|
|
True if the collection allows this file.
|
||
|
|
|
||
|
|
|
||
|
|
Checks based on any filters defined on the collection. If the
|
||
|
|
file is not valid according to the filters, this method returns false
|
||
|
|
and also calls the filter `onInvalid` method defined for the
|
||
|
|
collection, passing it an English error string that explains why it
|
||
|
|
failed.
|
||
|
|
|
||
|
|
> ```FS.Collection.prototype.allowsFile = function fsColAllowsFile(fileObj) { ...``` [filters.js:108](filters.js#L108)
|
||
|
|
|
||
|
|
|