Releases for sf 1.4
| Version |
License |
API |
Released |
|
1.5.4.1stable
|
MIT license |
1.5.0stable
|
20/05/2011 |
|
1.5.3stable
|
MIT license |
1.5.0stable
|
17/04/2011 |
|
1.5.1stable
|
MIT license |
1.5.1stable
|
20/09/2010 |
Releases for sf 1.3
| Version |
License |
API |
Released |
|
1.5.4.1stable
|
MIT license |
1.5.0stable
|
20/05/2011 |
|
1.5.3stable
|
MIT license |
1.5.0stable
|
17/04/2011 |
|
1.5.1stable
|
MIT license |
1.5.1stable
|
20/09/2010 |
Releases for sf 1.2
| Version |
License |
API |
Released |
|
1.5.4.1stable
|
MIT license |
1.5.0stable
|
20/05/2011 |
|
1.5.3stable
|
MIT license |
1.5.0stable
|
17/04/2011 |
|
1.5.1stable
|
MIT license |
1.5.1stable
|
20/09/2010 |
|
1.0.3stable
|
MIT license |
1.0.3stable
|
10/07/2009 |
|
1.0.1stable
|
MIT license |
1.0.1stable
|
26/04/2009 |
Releases for sf 1.1
| Version |
License |
API |
Released |
|
1.5.1stable
|
MIT license |
1.5.1stable
|
20/09/2010 |
|
1.0.3stable
|
MIT license |
1.0.3stable
|
10/07/2009 |
|
1.0.1stable
|
MIT license |
1.0.1stable
|
26/04/2009 |
|
1.0.0stable
|
MIT license |
1.0.0stable
|
24/04/2009 |
Changelog for release 1.0.0 - 24/04/2009
- Initial creation of plugin
Other releases
Release 1.5.4.1 - 20/05/2011
Release 1.5.3 - 17/04/2011
Release 1.5.1 - 20/09/2010
Release 1.0.3 - 10/07/2009
Release 1.0.1 - 26/04/2009
Updating Symfony versions and adding Brent Shaffer as a Developer.
Release 1.0.0 - 24/04/2009
- Initial creation of plugin
csDoctrineActAsSortablePlugin
The csDoctrineActAsSortablePlugin is a symfony plugin that allows use of the doctrine behavior actAsSortable.
This behavior provides methods on your model for setting display order/position.
This plugin also contains images to implement for ordering.
Installation
Install the plugin
$ symfony plugin:install csDoctrineActAsSortablePlugin
Apply the behavior to your model in your schema file config/doctrine/schema.yml, ie:
model:
actAs: [Sortable]
Optionally accepts a UniqueBy attribute which will be used on a model with a one-to-many relationship
model:
actAs: [Sortable]
uniqueBy: [parent_id]
Rebuild your models and database
$ symfony doctrine:build-all-reload
alternatively you could build the models, the sql, then run the sql manually
Publish your assets
$ symfony plugin:publish-assets
Clear your cache
$ symfony cc
Available Record Methods
Available Table Methods
sort - accepts the array created by the symfony/prototype sortableElement tag
Doctrine::getTable('Model')->sort($order);
findAllSorted - Accepts sort order (asc, desc)
Doctrine::getTable('Model')->findAllSorted('ASCENDING');
findAllSortedWithParent - accepts the parent column name, the value, and sort order (asc, desc)
Doctrine::getTable('Model')->findAllSortedWithParent($fk_value, $fk_name, 'ASCENDING');
Example Usage With Admin Generator
In your module, edit config/generator.yml, and under list, object actions, add:
object_actions:
promote: { name: Promote, action: promote, icon: sortable/icons/promote.png }
demote: { name: Demote, action: demote, icon: sortable/icons/demote.png }
_edit: -
_delete: -
In your module, edit ``, Add the following actions:
public function executePromote()
{
$object=Doctrine::getTable('MyModel')->findOneById($this->getRequestParameter('id'));
$object->promote();
$this->redirect("@moduleIndexRoute");
}
public function executeDemote()
{
$object=Doctrine::getTable('MyModel')->findOneById($this->getRequestParameter('id'));
$object->demote();
$this->redirect("@moduleIndexRoute");
}