modSnippet Object Cheat Sheet (MODX Revolution 2.x)

Body
modSnippet database table fields, schema definitions, and relationships: aggregate, composite, ancestral. Also provides default object values.

Authored on

Framework

modSnippet (2.8.3-pl)

Table Fields



    [id] => 
    [source] => 0
    [property_preprocess] => 0
    [name] => 
    [description] => 
    [editor_type] => 0
    [category] => 0
    [cache_type] => 0
    [snippet] => 
    [locked] => 0
    [properties] => 
    [moduleguid] => 
    [static] => 0
    [static_file] => 

Validation Rules



    [name] =>         
            [invalid] =>                 
                    [type] => preg_match
                    [rule] => /^?!\s[a-zA-Z0-9\x2d-\x2f\x7f-\xff-_\s]+? snippet_err_invalid_name

Index Meta


    [PRIMARY] =>         
            [alias] => PRIMARY
            [primary] => 1
            [unique] => 1
            [type] => BTREE
            [columns] =>                 
                    [id] =>                         
                            [length] => 
                            [collation] => A
                            [null] => 

    [name] =>         
            [alias] => name
            [primary] => 
            [unique] => 1
            [type] => BTREE
            [columns] =>                 
                    [name] =>                         
                            [length] => 
                            [collation] => A
                            [null] => 

    [category] =>         
            [alias] => category
            [primary] => 
            [unique] => 
            [type] => BTREE
            [columns] =>                 
                    [category] =>                         
                            [length] => 
                            [collation] => A
                            [null] => 

    [locked] =>         
            [alias] => locked
            [primary] => 
            [unique] => 
            [type] => BTREE
            [columns] =>                 
                    [locked] =>                         
                            [length] => 
                            [collation] => A
                            [null] => 

    [moduleguid] =>         
            [alias] => moduleguid
            [primary] => 
            [unique] => 
            [type] => BTREE
            [columns] =>                 
                    [moduleguid] =>                         
                            [length] => 
                            [collation] => A
                            [null] => 

    [static] =>         
            [alias] => static
            [primary] => 
            [unique] => 
            [type] => BTREE
            [columns] =>                 
                    [static] =>                         
                            [length] => 
                            [collation] => A
                            [null] => 

Field Aliases



    [content] => snippet

Table Construction meta defined in schema



    [id] =>         
            [dbtype] => int
            [precision] => 10
            [attributes] => unsigned
            [phptype] => integer
            [null] => 
            [index] => pk
            [generated] => native
        
    [source] =>         
            [dbtype] => int
            [attributes] => unsigned
            [phptype] => integer
            [null] => 
            [default] => 0
            [index] => fk      

    [property_preprocess] =>         
            [dbtype] => tinyint
            [precision] => 1
            [attributes] => unsigned
            [phptype] => boolean
            [null] => 
            [default] => 0        

    [name] =>         
            [dbtype] => varchar
            [precision] => 50
            [phptype] => string
            [null] => 
            [default] => 
            [index] => unique
        
    [description] =>         
            [dbtype] => varchar
            [precision] => 191
            [phptype] => string
            [null] => 
            [default] =>         

    [editor_type] =>         
            [dbtype] => int
            [precision] => 11
            [phptype] => integer
            [null] => 
            [default] => 0
        
    [category] =>         
            [dbtype] => int
            [precision] => 11
            [phptype] => integer
            [null] => 
            [default] => 0
            [index] => fk
        
    [cache_type] =>         
            [dbtype] => tinyint
            [precision] => 1
            [phptype] => integer
            [null] => 
            [default] => 0
        
    [snippet] =>         
            [dbtype] => mediumtext
            [phptype] => string
       
    [locked] =>         
            [dbtype] => tinyint
            [precision] => 1
            [attributes] => unsigned
            [phptype] => boolean
            [null] => 
            [default] => 0
            [index] => index
        
    [properties] =>         
            [dbtype] => text
            [phptype] => array
            [null] => 1
        
    [moduleguid] =>         
            [dbtype] => varchar
            [precision] => 32
            [phptype] => string
            [null] => 
            [default] => 
            [index] => fk
        
    [static] =>         
            [dbtype] => tinyint
            [precision] => 1
            [attributes] => unsigned
            [phptype] => boolean
            [null] => 
            [default] => 0
            [index] => index
        
    [static_file] =>         
            [dbtype] => varchar
            [precision] => 191
            [phptype] => string
            [null] => 
            [default] => 

Aggregate Relations



    [CategoryAcls] =>         
            [class] => modAccessCategory
            [local] => category
            [foreign] => target
            [owner] => local
            [cardinality] => many
        
    [Source] =>         
            [class] => sources.modMediaSource
            [local] => source
            [foreign] => id
            [owner] => foreign
            [cardinality] => one
        
    [Category] =>         
            [class] => modCategory
            [key] => id
            [local] => category
            [foreign] => id
            [cardinality] => one
            [owner] => foreign

Composite Relations



    [Acls] =>         
            [class] => modAccessElement
            [local] => id
            [foreign] => target
            [owner] => local
            [cardinality] => many        

    [PropertySets] =>         
            [class] => modElementPropertySet
            [local] => id
            [foreign] => element
            [owner] => local
            [cardinality] => many
            [criteria] =>                 
                    [foreign] =>                         
                            [element_class] => modSnippet

Ancestors


    [0] => modSnippet
    [1] => modScript
    [2] => modElement
    [3] => modAccessibleSimpleObject
    [4] => modAccessibleObject
    [5] => xPDOObject