Hello,
I try to follow the ModelAdmin but I don't totally understand what I should do and getting errors.
What I did:
Created a files in msite/code
1. Donation.php
class Donation extends DataObject
{
static $db = array('Name'=>'Varchar(100)');
static $has_one = array('DonationAmount' => 'Amount');
}
2. DonationAmount.php
class DonationAmount extends DataObject
{
static $db = array('Amount'=>'Varchar(100)');
static $has_many = array('Donations' => 'Donation');
}
3. ClunyDonations.php
class ClunyDonations extends ModelAdmin
{
public static $manage_models = array('Donation', 'DonationAmount');
static $url_segment = 'donations';
static $menu_title = 'Donations';
}
In my admin menu I now see Donations, but clicking on it I get this error:
ModelAdmin::getManagedModels():
You need to specify at least one DataObject subclass in public static $managed_models.
Make sure that this property is defined, and that its visibility is set to "public"
IN GET /clunysilver/admin/donations/
Line 277 in C:\wamp\www\clunysilver\framework\admin\code\ModelAdmin.php
What am I missing?