views:

45

answers:

0

I have a CampaignForm class. It has children Campaign1Form, Campaign2Form, .. CampaignNForm They have by default ref_campaign_type = unique_value_for_each_form_class;

How can I get this value in parent class CampaignForm?

My way is:

$vars = sfContext::getInstance()->getUser()->getAttributeHolder()->get('storedValues', null, 'nsappid_appname.campaign');
$campaign_type = $vars['ref_campaign_type'];

But this is not good solution. Have symfony better way to do that?