MODX Revolution Object Cheat Sheet: modTemplate

MODX Revolution Object Cheat Sheet: modTemplate

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

Posted on February 02, 2015 at 08:03:00
Tags: Cheatsheet, modTemplate
Words: 562
Level: Beginner
Dependencies: None

modTemplate (2.6.5-pl)

Table Fields



    [id] => 
    [source] => 0
    [property_preprocess] => 0
    [templatename] => 
    [description] => Template
    [editor_type] => 0
    [category] => 0
    [icon] => 
    [template_type] => 0
    [content] => 
    [locked] => 0
    [properties] => 
    [static] => 0
    [static_file] => 

Validation Rules




Index Meta



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

                

        

    [templatename] => 
        
            [alias] => templatename
            [primary] => 
            [unique] => 1
            [type] => BTREE
            [columns] => 
                
                    [templatename] => 
                        
                            [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] => 
                        

                

        

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

                

        


Field Aliases




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
        

    [templatename] => 
        
            [dbtype] => varchar
            [precision] => 50
            [phptype] => string
            [null] => 
            [default] => 
            [index] => unique
        

    [description] => 
        
            [dbtype] => varchar
            [precision] => 191
            [phptype] => string
            [null] => 
            [default] => Template
        

    [editor_type] => 
        
            [dbtype] => int
            [precision] => 11
            [phptype] => integer
            [null] => 
            [default] => 0
        

    [category] => 
        
            [dbtype] => int
            [precision] => 11
            [phptype] => integer
            [null] => 
            [default] => 0
            [index] => fk
        

    [icon] => 
        
            [dbtype] => varchar
            [precision] => 191
            [phptype] => string
            [null] => 
            [default] => 
        

    [template_type] => 
        
            [dbtype] => int
            [precision] => 11
            [phptype] => integer
            [null] => 
            [default] => 0
        

    [content] => 
        
            [dbtype] => mediumtext
            [phptype] => string
            [null] => 
            [default] => 
        

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

    [properties] => 
        
            [dbtype] => text
            [phptype] => array
            [null] => 1
        

    [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
            [local] => category
            [foreign] => id
            [cardinality] => one
            [owner] => foreign
        

    [Resources] => 
        
            [class] => modResource
            [local] => id
            [foreign] => template
            [cardinality] => many
            [owner] => local
        


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] => modTemplate
                        

                

        

    [TemplateVarTemplates] => 
        
            [class] => modTemplateVarTemplate
            [local] => id
            [foreign] => templateid
            [cardinality] => many
            [owner] => local
        


Ancestors



    [0] => modTemplate
    [1] => modElement
    [2] => modAccessibleSimpleObject
    [3] => modAccessibleObject
    [4] => xPDOObject

MODX:
Website development platform combining security, power, and innovation.