I am trying to centralize all the list of values that will be used in other modules, this way it's necessary to replicate the data in each module.
For example there is a dropdown called Season that will be applied to multiple model in different modules.
I define in a module called "data" with the following DefaultDataMaker
class DatasDefaultDataMaker extends DefaultDataMaker
{
public function make()
{
$values = array(
'000 - No Season',
'131 - Spring Summer 2013',
'132 - Fall Winter 2013',
);
static::makeCustomFieldDataByValuesAndDefault('Seasons',
$values);
}
}
Then in the Materials module the field is defined in the model
'relations' => array( 'season' => array(RedBeanModel::HAS_ONE, 'OwnedCustomField', RedBeanModel::NOT_OWNED), ) .................... 'customFields' => array( 'season' => 'Seasons', ),
and in the EditAndDetailsView
array(
'elements' => array(
array('attributeName' => 'season', 'type' => 'DropDown', 'addBlank' => true),
),
),
There is no error installing and when in edit mode I even see the field but it's not populated with data, what I am missing?










