Can anyone tell me the error in the below script
I am getting the error ( ! ) Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\SilverStripe-v2.4.5\SilverStripe-v2.4.5\mysite\code\Fixture.php on line 26 when I build the database
Line 26 is $fields->addFieldToTab( 'Root.Content.Teams', $tablefield );
<?php
class Fixture extends Page {
static $has_one = array(
'MyTeam' => 'Team'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$tablefield = new HasOneComplexTableField(
$this,
'MyTeam',
'Team',
array(
'TeamName' => 'TeamName',
'Country' => 'Country',
'Captain' => 'Captain'
),
'getCMSFields_forPopup'
);
$tablefield->setParentClass('Fixture');
$fields->addFieldToTab( 'Root.Content.Teams', $tablefield );
return $fields;
}
}
class Project_Controller extends Page_Controller {}
Cheers
Ranjit