cakephp-favorites

Favorites Plugin for CakePHP

MIT License

Downloads
557
Stars
1
cakephp-favorites - 0.1.1 Latest Release

Published by dereuromark 7 months ago

Fixes

  • Normalized callbacks
cakephp-favorites - 0.1.0

Published by dereuromark 7 months ago

Initial Release

There are different types:

  • Star: Binary (set=yes, unset=no) on a record, so either favorite or not. Basically a "like" without being able to "dislike".
    • StarableBehavior without any values and addStar()/removeStar()
  • Like: Boolean behavior of voting thumbs up/down for "like" vs "dislike".
    • LikeableBehavior without any values and addLike()/addDislike()/removeLikeOrDislike()
  • Favorite: Enum like list of freely defined values between int(-128...128) mapped to a map of int|string values or PHP enum and its values.
    • FavoriteableBehavior with custom values and addFavorite()/removeFavorite() as well as defined values config.

Features:

  • Reactions so far can only be one per record and user.
  • Star type has a counter-cache option built-in (default false).
  • Each type can be used for single use (per person only), makes most sense for Star type.
  • Each type can also be used for multi-user approach, counting and displaying the total reactions.

Included commits: https://github.com/dereuromark/cakephp-favorites/tree/0.1.0