Download the PHP package gintonicweb/multiselect without Composer
On this page you can find all versions of the php package gintonicweb/multiselect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gintonicweb/multiselect
More information about gintonicweb/multiselect
Files in gintonicweb/multiselect
Package multiselect
Short Description Multiselect behavior plugin for CakePHP
License MIT
Homepage http://gintoniccms.com
Informations about the package multiselect
Multiselect
Toggle, select or multiselect a database field based on a set of conditions
Install
Using Composer:
You then need to load the plugin. You can use the shell command:
or by manually adding statement shown below to your app's config/bootstrap.php
:
Usage
In a playlist, a single song can be play at the time. Whenever a song is marked
as playing, all of the other songs are marked as not playing. for this we use the
boolean field playing
.
Load the behavior in your model :
More complex use cases can be covered like the following. Where only 2 articles can
be marked as featured
at the time for the same author. When a third article is marked
as featured, one of the 3 articles gets unfeatured. In this case, ordered by the
least view count and by modification date.
Configuration
[field_name]
The name of the field used as selectstate
Either mark the active field astrue
orfalse
scope
Selections can be grouped by fields defined herelimit
Maximum number of selected elementsorder
Order in which to unselect fields when the limit is exceeded
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/multiselect/issues
License
Copyright (c) 2015, Use Muffin and licensed under The MIT License.