2007-12-14 01:54:53 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class BlogRole extends DataObjectDecorator {
|
|
|
|
|
2007-12-20 05:32:01 +01:00
|
|
|
/**
|
|
|
|
* Extend the member table with some extra fields.
|
|
|
|
*/
|
2007-12-14 01:54:53 +01:00
|
|
|
function extraDBFields() {
|
|
|
|
return array(
|
|
|
|
'db' => array(
|
2007-12-15 23:47:20 +01:00
|
|
|
'Hash' => 'Varchar(32)',
|
|
|
|
'GroupCode' => 'Varchar(255)'
|
2007-12-14 01:54:53 +01:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
2007-12-20 05:32:01 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* These fields are used for the newsletter subscription form.
|
|
|
|
*/
|
|
|
|
function subscribeFields() {
|
|
|
|
return new FieldSet(
|
|
|
|
new TextField('FirstName', 'Your first name'),
|
|
|
|
new TextField('Surname', 'Your surname'),
|
|
|
|
new EmailField('Email', 'Your email')
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* These are the required fields for the newsletter subscription form.
|
|
|
|
*/
|
|
|
|
function subscribeRequiredFields() {
|
|
|
|
return new RequiredFields(array(
|
|
|
|
'FirstName',
|
|
|
|
'Email'
|
|
|
|
));
|
|
|
|
}
|
2007-12-14 01:54:53 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|