gharlan / propel-default-order-behavior
DefaultOrderBehavior for Propel2
Installs: 7 920
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 2
Forks: 2
Open Issues: 0
Type:propel-behavior
Requires
- php: >=5.4
- propel/propel: ~2.0@dev
This package is auto-updated.
Last update: 2024-11-17 09:43:34 UTC
README
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.