Skip to content

weconstudio-it/propel-to-string-behavior

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ToStringBehavior for Propel2

This Behavior lets you define the default toString() method for tables.

Installation

Add the package to your composer.json:

{
    "require": {
        "weconstudio-it/weconstudio-it/propel-to-string-behavior": "~1.0@dev"
    }
}

Usage

    <table name="default_order_1">
        <column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
        <column name="title" type="VARCHAR" />

        <behavior name="default-order">
            <parameter name="column" value="title"/>
        </behavior>
    </table>

    <table name="default_order_2">
        <column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
        <column name="title" type="VARCHAR" />

        <behavior name="default-order">
            <parameter name="column1" value="title"/>
            <parameter name="column2" value="id desc"/>
        </behavior>
    </table>

License

See the LICENSE file.

About

Propel ORM 2 ToString Behaviour

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages