Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
DefaultOrderBehavior for Propel2
PHP
branch: master

Merge pull request #1 from thetreew/patch-1

Update README.md (set correct package name)
latest commit 74813805c4
@gharlan authored

README.md

DefaultOrderBehavior for Propel2

The Behavior lets you define the default order for tables.

Installation

Add the package to your composer.json:

{
    "require": {
        "gharlan/propel-default-order-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.

Something went wrong with that request. Please try again.