Skip to content

k3dbe/propel-taggable-behavior

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

TaggableBehavior

Installation

Download TaggableBehavior.php and put it somewhere.

propel.behavior.taggable.class = path.to.taggable.behavior

If you are using composer then just add:

{
    "require": {
        "k3dbe/propel-taggable-behavior": "dev-master"
    }
}

The ini-configuration would be

propel.behavior.taggable.class = vendor.k3dbe.src.propel-taggable-behavior.src.TaggableBehavior

Usage

Behavior creates two persistent tables:

  • tag (id, name)
  • %table%_tag

Add to schema.xml:

<behavior name="taggable" />

Behavior will add several methods to the Model:

public function addTags($tags, PropelPDO $con = null)
public function removeTags($tags, PropelPDO $con = null)
public function addTag(Tag $tag)
public function removeTag(Tag $tag)
public function removeAllTags(PropelPDO $con = null)

About

Tags for propel as separate behavior

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%