Witam,
Mam problem z uruchomineim widgetu relacji M:M w panelu admina, oto schma:
Product:
actAs:
Taggable: ~
Timestampable:
created:
name: created_at
type: timestamp
format: Y-m-d H:i
expression: NOW()
onInsert: true
updated:
disabled: true
options: { type: INNODB, collate: utf8_unicode_ci, charset: utf8 }
columns:
name: { type: string(255), notnull: true, unique: true }
relations:
Packages: { class: Package, local: product_id, foreign: package_id, refClass: PackageProduct }
Package:
actAs:
Timestampable:
created:
disabled: true
updated:
disabled: true
options: { type: INNODB, collate: utf8_unicode_ci, charset: utf8 }
columns:
name: { type: string(255) }
relations:
Products: { class: Product, local: package_id, foreign: product_id, refClass: PackageProduct }
PackageProduct:
actAs:
Timestampable:
created:
disabled: true
updated:
disabled: true
options: { type: INNODB, collate: utf8_unicode_ci, charset: utf8 }
columns:
package_id: { type: integer, primary: true }
product_id: { type: integer, primary: true }
w formie modelu package mam:
class PackageForm extends BasePackageForm
{
public function configure()
{
$this->widgetSchema['product_list']->setOption('renderer_class', 'sfWidgetFormSelectDoubleList');
$this->widgetSchema['product_list']->setOption('renderer_options',
'label_associated' => 'powiązane',
'label_unassociated' => 'dostepne produkty',
)
);
}
}
i dodaje product_list w generator.yml (modulu generowanego poprzez admin generator dla modelu Package), po czym jak proboje dodac nowy package dostaje blad:
Fatal error: Call to a member function setOption() on a non-object in C:\wamp\www\lib\form\doctrine\PackageForm.class.php on line 15
plugin sfFormExtraPlugin mam zainstlaowany, wiec nie wiem ocb? wydaje mi sie cos w schema mam zle ale proboje roznych mozliwosci i nie moge znalzc rozwiazania