Download the PHP package aschelch/cakephp-readable-behavior without Composer
On this page you can find all versions of the php package aschelch/cakephp-readable-behavior. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download aschelch/cakephp-readable-behavior
More information about aschelch/cakephp-readable-behavior
Files in aschelch/cakephp-readable-behavior
Download aschelch/cakephp-readable-behavior
More information about aschelch/cakephp-readable-behavior
Files in aschelch/cakephp-readable-behavior
Vendor aschelch
Package cakephp-readable-behavior
Short Description CakePHP ReadableBehavior provides a simple behavior to make a 'Mark as Read/Unread' feature for your models
License
Homepage https://github.com/aschelch/cakephp-readable-behavior
Package cakephp-readable-behavior
Short Description CakePHP ReadableBehavior provides a simple behavior to make a 'Mark as Read/Unread' feature for your models
License
Homepage https://github.com/aschelch/cakephp-readable-behavior
Please rate this library. Is it a good library?
Informations about the package cakephp-readable-behavior
CakePHP Readable Behavior
CakePHP ReadableBehavior provides a simple behavior to make a "Mark as Read/Unread" feature for your models
Installation
Download the plugin
cd app/Plugin
git clone git://github.com/aschelch/cakephp-readable-behavior.git Readable
Attach the Readable behavior to the model
public Post extends AppModel{
$actsAs = array('Readable.Readable');
}
Add a 'read' boolean column in your table or change the default field name
public Post extends AppModel{
$actsAs = array('Readable.Readable' => array(
'field' => 'displayed'
));
}
Usage
Mark a post as read using id
$this->Post->markAsRead(1);
Mark multiple posts as read using a array of id
$this->Post->markAsRead(array(1,2,3));
Mark a post as unread using id
$this->Post->markAsUnread(1);
Mark multiple posts as unread using a array of id
$this->Post->markAsUnread(array(1,2,3));
Mark all posts using a condition as read
$this->Post->markAllAsRead(array('Post.user_id'=>1));
Mark all posts using a condition as unread
$this->Post->markAllAsUnread(array('Post.user_id'=>1));
All versions of cakephp-readable-behavior with dependencies
PHP Build Version
Package Version
The package aschelch/cakephp-readable-behavior contains the following files
Loading the files please wait ....