Development

#3174 (Enabling easy tag insertion in fixtures/test_data_file.yml)

You must first sign up to be able to contribute.

Ticket #3174 (closed enhancement: fixed)

Opened 4 months ago

Last modified 4 months ago

Enabling easy tag insertion in fixtures/test_data_file.yml

Reported by: jug Assigned to: xavier
Priority: minor Milestone:
Component: sfPropelActAsTaggablePlugin Version: 1.0.10
Keywords: Cc:
Qualification: Accepted

Description

Hi,

I have the following schema.yml (using sfPropelAlternativeSchemaPlugin) :

classes:
  Whatever:
    columns:
      name: varchar(255)
    behaviors:
      sfPropelActAsTaggableBehaviorPlugin: {}

And wanted to easily add tags to my Whatever class, like this :

Whatever:
  a:
    name: hello
    tags: truc, bidule, chose
  b:
    name: world
    tags: machin, chouette

To do so : just add the following function in sfPropelActAsTaggableBehavior.class.php

  public function setTags( BaseObject $object, $tagname )
  {
    return $this->addTag( $object, $tagname );
  }

Here are the diff files. Bye,

Attachments

sfPropelActAsTaggableBehavior.class.php.diff (133 bytes) - added by jug on 03/20/08 16:26:56.
config.php.diff (83 bytes) - added by jug on 03/20/08 16:29:03.

Change History

03/20/08 16:26:56 changed by jug

  • attachment sfPropelActAsTaggableBehavior.class.php.diff added.

03/20/08 16:29:03 changed by jug

  • attachment config.php.diff added.

03/21/08 13:16:10 changed by xavier

  • status changed from new to closed.
  • resolution set to fixed.
  • qualification changed from Unreviewed to Accepted.

fixed in [8023]