new Category()
Category describes a category which can trigger on certain events (signals)
Properties:
| Name | Type | Description | 
|---|---|---|
name | 
            
            
            string | the category name  | 
        
count | 
            
            
            string | how many categories are under this node  | 
        
defs | 
            
            
            array | a list of allowed keyvalue definitions  | 
        
parent | 
            
            
            string | the primary key of the parent category  | 
        
modified | 
            
            
            Moment | the modified date of the category  | 
        
Extends
Methods
- 
    
canDelete(){promise}
 - 
    
    
    
Checks via the api if we can delete the Category document
 - 
    
inherited create(skipRead){promise}
 - 
    
    
    
Creates an object by the default api.create
Name Type Description skipReadskips reading the response via _fromJson (false)
 - 
    
inherited delete(){promise}
 - 
    
    
    
Deletes an object by the default api.delete
 - 
    
inherited discardChanges(){promise}
 - 
    
    
    
Discards any changes made to the object from the previously loaded raw response or resets it when no old raw response was found
 - 
    
inherited existsInDb(){boolean}
 - 
    
    
    
Checks if the document exists in the database
 - 
    
inherited get(_fields){promise}
 - 
    
    
    
Gets an object by the default api.get
Name Type Description _fields - 
    
inherited isDirty(){boolean}
 - 
    
    
    
Checks if the object needs to be saved We don't check any of the keyvalues (or comments, attachments) here
 - 
    
isEmpty(){boolean}
 - 
    
    
    
Checks if the object is empty, it never is
 - 
    
isValid(){boolean}
 - 
    
    
    
Checks if the category has any validation errors
 - 
    
isValidName(){Boolean}
 - 
    
    
    
Checks if name is valid
 - 
    
inherited reload(_fields){promise}
 - 
    
    
    
Reloads the object from db
Name Type Description _fields - 
    
inherited reset(){promise}
 - 
    
    
    
Resets the object
 - 
    
inherited update(skipRead){promise}
 - 
    
    
    
Updates an object by the default api.update
Name Type Description skipReadskips reading the response via _fromJson (false)