Download the PHP package muffin/orderly without Composer
On this page you can find all versions of the php package muffin/orderly. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download muffin/orderly
More information about muffin/orderly
Files in muffin/orderly
Package orderly
Short Description Default ordering (behavior) for CakePHP
License MIT
Homepage https://github.com/usemuffin/orderly
Informations about the package orderly
Orderly
Allows setting default order for your tables.
Install
Using Composer:
Then load the plugin using the console command:
What is does
Orderly allow you to set default ORDER
clause for your table's SELECT
queries.
Usage
Here's how you can add the Orderly
behavior for your tables:
Value for order
key can any valid value that \Cake\ORM\Query::orderBy()
takes.
The default order clause will only be applied to the primary query and when no
custom order clause has already been set for the query.
You can also configure the behavior to apply the default order based on required
condition using callback
option. The order will be applied if callback returns true
:
The behavior can also be configured with multiple orders which are applied based on return value of their respective callbacks:
Patches & Features
- Fork
- Mod, fix
- Test - this is important, so it's not unintentionally broken
- Commit - do not mess with license, todo, version, etc. (if you do change any, bump them into commits of their own that I can ignore when I pull)
- Pull request - bonus point for topic branches
To ensure your PRs are considered for upstream, you MUST follow the CakePHP coding standards.
Bugs & Feedback
http://github.com/usemuffin/orderly/issues
License
Copyright (c) 2015-Present, Use Muffin and licensed under The MIT License.