2017 © Pedro Peláez
 

library propel-likeable-behavior

Add functionality to like objects.

image

smirik/propel-likeable-behavior

Add functionality to like objects.

  • Sunday, September 9, 2012
  • by smirik
  • Repository
  • 1 Watchers
  • 4 Stars
  • 5,546 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

LikeableBehavior

Installation

Download LikeableBehavior.php and put it somewhere., (*1)

``` ini propel.behavior.likeable.class = path.to.likeable.behavior, (*2)


If you are using composer then just add: ```js { "require": { "smirik/propel-likeable-behavior": "*" } }

Usage

Add to schema.xml:, (*3)

``` xml , (*4)


Behavior will create table *likes* and add several methods to the Model: ``` php public function addLike($user_id, $mark = 1, PropelPDO $con = null); public function removeLike($user_id, PropelPDO $con = null) public function hasLike($user_id, PropelPDO $con = null) public function countLikes(PropelPDO $con = null)

user_id could be any integer., (*5)

Requirements

  • Model should have getId() method.
  • Type will be placed automatically based on class name (with namespace)

Credits

  • William Durand william.durand1@gmail.com for documentation.
  • Glorpen https://bitbucket.org/glorpen/taggablebehaviorbundle for samples.

The Versions

09/09 2012

dev-master

9999999-dev

Add functionality to like objects.

  Sources   Download

MIT

The Requires

 

behavior propel likes