Development

Changeset 7952

You must first sign up to be able to contribute.

Changeset 7952

Show
Ignore:
Timestamp:
03/18/08 18:23:49 (2 years ago)
Author:
xavier
Message:

sfPropelActAsTaggableBehaviorPlugin: added toString method in the "tag" model - refs #3133

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfPropelActAsTaggableBehaviorPlugin/trunk/lib/model/Tag.php

    r4076 r7952  
    44 * Subclass for representing a row from the 'tag' table. 
    55 * 
    6  *  
     6 * 
    77 * 
    88 * @package plugins.sfPropelActAsTaggableBehaviorPlugin.lib.model 
    9  */  
     9 */ 
    1010class Tag extends BaseTag 
    1111{ 
     12  public function __toString() 
     13  { 
     14    return $this->getName(); 
     15  } 
     16 
    1217  public function getModelsTaggedWith() 
    1318  { 
    14      
     19    return TagPeer::getModelsTaggedWith($this->getName()); 
    1520  } 
    1621 
    1722  public function getRelated($options = array()) 
    1823  { 
    19      
     24    return TagPeer::getRelatedTags($this->getName()); 
    2025  } 
    2126 
    2227  public function getTaggedWith($options = array()) 
    2328  { 
    24      
     29    return TagPeer::getTaggedWith($this->getName()); 
    2530  } 
    2631} 
  • plugins/sfPropelActAsTaggableBehaviorPlugin/trunk/lib/sfPropelActAsTaggableToolkit.class.php

    r7475 r7952  
    9090      $i = 0; 
    9191 
    92       foreach ( $tags as $tag
     92      foreach ($tags as $tag
    9393      { 
    9494        $result .= '"'.$tag.'"'; 
     
    157157    $power = 0.7; 
    158158 
    159     if ( count($tag_cloud) > 0
     159    if (count($tag_cloud) > 0
    160160    { 
    161161      $max_count = max($tag_cloud); 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.