mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
commit
89db95b044
@ -59,7 +59,7 @@ class BasicFieldsTestPage extends TestPage {
|
|||||||
"TimeDisabled" => "23:59",
|
"TimeDisabled" => "23:59",
|
||||||
);
|
);
|
||||||
|
|
||||||
function getCMSFields() {
|
function getCMSFields($params = null) {
|
||||||
$fields = parent::getCMSFields();
|
$fields = parent::getCMSFields();
|
||||||
|
|
||||||
$fields->addFieldsToTab('Root.Text', array(
|
$fields->addFieldsToTab('Root.Text', array(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class FileUploadRole extends DataExtension{
|
class FileUploadRole extends DataExtension{
|
||||||
function extraStatics() {
|
function extraStatics($class = null, $extension = null) {
|
||||||
return array(
|
return array(
|
||||||
'has_one' => array(
|
'has_one' => array(
|
||||||
'AFile' => 'File',
|
'AFile' => 'File',
|
||||||
@ -9,4 +9,4 @@ class FileUploadRole extends DataExtension{
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class FrameworkTestRole extends DataExtension {
|
class FrameworkTestRole extends DataExtension {
|
||||||
function extraStatics() {
|
function extraStatics($class = null, $extension = null) {
|
||||||
return array(
|
return array(
|
||||||
'has_one' => array(
|
'has_one' => array(
|
||||||
'FavouritePage' => 'SiteTree',
|
'FavouritePage' => 'SiteTree',
|
||||||
@ -9,7 +9,7 @@ class FrameworkTestRole extends DataExtension {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateCMSFields($fields) {
|
function updateCMSFields(FieldList $fields) {
|
||||||
$fields->push(new TreeDropdownField("FavouritePageID", "Favourite page", "SiteTree"));
|
$fields->push(new TreeDropdownField("FavouritePageID", "Favourite page", "SiteTree"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,4 +40,4 @@ class FrameworkTestRole extends DataExtension {
|
|||||||
'Hayley', 'Octavius', 'Walker', 'Gary', 'Elton', 'Janna', 'Ursa', 'Lars', 'Moses', 'Lareina', 'Elmo', 'Shea', 'Duncan', 'Velma', 'Acton', 'Galena', 'Heidi', 'Troy', 'Elliott', 'Whitney', 'Summer', 'Olga', 'Tatum', 'Zeph', 'Jared', 'Hilda', 'Quinlan', 'Chaim', 'Xenos', 'Cara', 'Tatiana', 'Tyrone', 'Juliet', 'Chester', 'Hannah', 'Imani', 'Quinn', 'Ariel', 'Aretha', 'Courtney ', 'Shellie', 'Garrett', 'Camilla', 'Simon', 'Mohammad', 'Kirby', 'Rae', 'Xena', 'Noel', 'Omar', 'Shannon', 'Iola', 'Maia', 'Serina', 'Taylor', 'Alice', 'Lucy', 'Austin', 'Abel', 'Yetta', 'Ulysses', 'Donovan', 'Castor', 'Emmanuel', 'Nero', 'Virginia', 'Gregory', 'Neville', 'Len', 'Knox', 'Gavin', 'Pascale', 'Hyatt', 'Alden', 'Emerald', 'Cherokee', 'Adam', 'Uma', 'Serena', 'Isabelle', 'Kieran', 'Gay', 'Lavinia', 'Elvis', 'Illana', 'Lee', 'Ariana', 'Hilel', 'Gage', 'Larissa', 'Richard', 'Allen'
|
'Hayley', 'Octavius', 'Walker', 'Gary', 'Elton', 'Janna', 'Ursa', 'Lars', 'Moses', 'Lareina', 'Elmo', 'Shea', 'Duncan', 'Velma', 'Acton', 'Galena', 'Heidi', 'Troy', 'Elliott', 'Whitney', 'Summer', 'Olga', 'Tatum', 'Zeph', 'Jared', 'Hilda', 'Quinlan', 'Chaim', 'Xenos', 'Cara', 'Tatiana', 'Tyrone', 'Juliet', 'Chester', 'Hannah', 'Imani', 'Quinn', 'Ariel', 'Aretha', 'Courtney ', 'Shellie', 'Garrett', 'Camilla', 'Simon', 'Mohammad', 'Kirby', 'Rae', 'Xena', 'Noel', 'Omar', 'Shannon', 'Iola', 'Maia', 'Serina', 'Taylor', 'Alice', 'Lucy', 'Austin', 'Abel', 'Yetta', 'Ulysses', 'Donovan', 'Castor', 'Emmanuel', 'Nero', 'Virginia', 'Gregory', 'Neville', 'Len', 'Knox', 'Gavin', 'Pascale', 'Hyatt', 'Alden', 'Emerald', 'Cherokee', 'Adam', 'Uma', 'Serena', 'Isabelle', 'Kieran', 'Gay', 'Lavinia', 'Elvis', 'Illana', 'Lee', 'Ariana', 'Hilel', 'Gage', 'Larissa', 'Richard', 'Allen'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
class FrameworkTestSiteTreeExtension extends DataExtension {
|
class FrameworkTestSiteTreeExtension extends DataExtension {
|
||||||
|
|
||||||
function extraStatics() {
|
function extraStatics($class = null, $extension = null) {
|
||||||
return array(
|
return array(
|
||||||
'has_one' => array('RelationFieldsTestPage' => 'RelationFieldsTestPage'),
|
'has_one' => array('RelationFieldsTestPage' => 'RelationFieldsTestPage'),
|
||||||
'belongs_many_many' => array('RelationFieldsTestPages' => 'RelationFieldsTestPage'),
|
'belongs_many_many' => array('RelationFieldsTestPages' => 'RelationFieldsTestPage'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ class GridFieldTestPage extends Page {
|
|||||||
$page->doPublish();
|
$page->doPublish();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCMSFields() {
|
public function getCMSFields($class = null, $extension = null) {
|
||||||
$fields = parent::getCMSFields();
|
$fields = parent::getCMSFields();
|
||||||
|
|
||||||
$config = new GridFieldConfig_RecordEditor();
|
$config = new GridFieldConfig_RecordEditor();
|
||||||
@ -70,4 +70,4 @@ class GridFieldTestPage_Controller extends Page_Controller {
|
|||||||
$grid = new GridField('Companies', 'Companies', new DataList('Company'),$config);
|
$grid = new GridField('Companies', 'Companies', new DataList('Company'),$config);
|
||||||
return new Form($this,'Form',new FieldList($grid),new FieldList());
|
return new Form($this,'Form',new FieldList($grid),new FieldList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
class LegacyTableFieldsTestPage extends TestPage {
|
class LegacyTableFieldsTestPage extends TestPage {
|
||||||
|
|
||||||
function getCMSFields() {
|
function getCMSFields($class = null, $extension = null) {
|
||||||
$fields = parent::getCMSFields();
|
$fields = parent::getCMSFields();
|
||||||
|
|
||||||
$tf = new TableListField('CompaniesTF', 'Company');
|
$tf = new TableListField('CompaniesTF', 'Company');
|
||||||
@ -20,4 +20,4 @@ class LegacyTableFieldsTestPage extends TestPage {
|
|||||||
|
|
||||||
class LegacyTableFieldsTestPage_Controller extends TestPage_Controller {
|
class LegacyTableFieldsTestPage_Controller extends TestPage_Controller {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ class RelationFieldsTestPage extends TestPage {
|
|||||||
"ManyManyPages" => "SiteTree",
|
"ManyManyPages" => "SiteTree",
|
||||||
);
|
);
|
||||||
|
|
||||||
function getCMSFields() {
|
function getCMSFields($class = null, $extension = null) {
|
||||||
$fields = parent::getCMSFields();
|
$fields = parent::getCMSFields();
|
||||||
|
|
||||||
$fields->addFieldToTab("Root.CheckboxSet",
|
$fields->addFieldToTab("Root.CheckboxSet",
|
||||||
@ -38,4 +38,4 @@ class RelationFieldsTestPage extends TestPage {
|
|||||||
|
|
||||||
class RelationFieldsTestPage_Controller extends TestPage_Controller {
|
class RelationFieldsTestPage_Controller extends TestPage_Controller {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ class TestPage extends Page {
|
|||||||
/**
|
/**
|
||||||
* We can only create subclasses of TestPage
|
* We can only create subclasses of TestPage
|
||||||
*/
|
*/
|
||||||
function canCreate() {
|
function canCreate($member = null) {
|
||||||
return $this->class != 'TestPage' && parent::canCreate();
|
return $this->class != 'TestPage' && parent::canCreate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,4 +85,4 @@ class TestPage_Controller extends Page_Controller {
|
|||||||
echo "<p>email sent to " . $data['Email'] . "</p>";
|
echo "<p>email sent to " . $data['Email'] . "</p>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user