Skip to content

Releases: dereuromark/cakephp-favorites

0.1.2

16 Sep 20:52
Compare
Choose a tag to compare

Fixes

  • Fixed up behaviors for CakePHP 5.1+ by preventing to add associations if already existing.

0.1.1

15 Apr 19:12
d42a4b9
Compare
Choose a tag to compare

Fixes

  • Normalized callbacks

0.1.0

04 Apr 18:18
Compare
Choose a tag to compare

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