This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » General discussion » Propel behavior - parameter, string instead of array
icon4.gif  Propel behavior - parameter, string instead of array [message #103109] Mon, 26 July 2010 23:02
Messages: 94
Registered: March 2007
Location: Poland
Hi Smile

I created a simple propel behavior. Of course my behavior extends SfPropelBehaviorBase class. My class have variable $parameters with default values and function to specify extra fields in database:
    public function modifyTable() {
        foreach ($this->getParameter('my_option') as $option)
              // some code to add fields

In schema.yml
      somethingable: { my_option: [ xxx ] }

And in class mentioned above function getParameter instead of array return string "Array". If I remove brackets [], function return right value "xxx", so it look like parser have propel with array. I use symfony 1.4 and propel 1.5.
I try to generate SQL with symfony propel:build --sql, but in generated SQL there is no extra fields, because param is not array. Could anybody help?

PaweĊ‚ Ryznar - programista JAVA :: Love IT - devBlog
Previous Topic:Forwarding skips an action's validate method.
Next Topic:Symfony forms: Internationalization
Goto Forum:

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software