mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
Merge branch '0.4' into 1
This commit is contained in:
commit
2b58663f81
@ -50,7 +50,7 @@ class TestPage extends Page implements \TestPageInterface
|
|||||||
$parent = static::getOrCreateParentPage();
|
$parent = static::getOrCreateParentPage();
|
||||||
$page->ParentID = $parent->ID;
|
$page->ParentID = $parent->ID;
|
||||||
$page->write();
|
$page->write();
|
||||||
$page->publish('Stage', 'Live');
|
$page->copyVersionToStage('Stage', 'Live');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@ class TestPage extends Page implements \TestPageInterface
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
$parent->write();
|
$parent->write();
|
||||||
$parent->doPublish();
|
$parent->publishRecursive();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class TestRegistryPage extends RegistryPage
|
|||||||
$page->ParentID = $parent->ID;
|
$page->ParentID = $parent->ID;
|
||||||
$page->DataClass = TestRegistryDataObject::class;
|
$page->DataClass = TestRegistryDataObject::class;
|
||||||
$page->write();
|
$page->write();
|
||||||
$page->publish('Stage', 'Live');
|
$page->copyVersionToStage('Stage', 'Live');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
19
code/fields/GridFieldTestNavigation.php
Normal file
19
code/fields/GridFieldTestNavigation.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace SilverStripe\FrameworkTest\Fields\Admin;
|
||||||
|
|
||||||
|
use SilverStripe\Admin\ModelAdmin;
|
||||||
|
use SilverStripe\FrameworkTest\Model\Company;
|
||||||
|
|
||||||
|
class GridFieldTestNavigation extends ModelAdmin
|
||||||
|
{
|
||||||
|
private static string $url_segment = 'gridfield-test-navigation';
|
||||||
|
private static string $menu_title = 'GridField Test Navigation';
|
||||||
|
private static string $menu_icon_class = 'font-icon-block-banner';
|
||||||
|
|
||||||
|
private static array $managed_models = [
|
||||||
|
Company::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
private static $page_length = 5;
|
||||||
|
}
|
@ -82,7 +82,7 @@ class FTPageMakerTask extends BuildTask
|
|||||||
$page->ParentID = $parentID;
|
$page->ParentID = $parentID;
|
||||||
$page->Title = "Test page {$fullPrefix}";
|
$page->Title = "Test page {$fullPrefix}";
|
||||||
$page->write();
|
$page->write();
|
||||||
$page->publish('Stage', 'Live');
|
$page->copyVersionToStage('Stage', 'Live');
|
||||||
|
|
||||||
echo "Created '$page->Title' ($page->ClassName)\n";
|
echo "Created '$page->Title' ($page->ClassName)\n";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user