Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Add generic types #137

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Forms/GridFieldSiteTreeAddNewButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ public function handleAction(GridField $gridField, $actionName, $arguments, $dat
'PageType' => $tmpData['pageType']
);

/** @var $controller CMSPageAddController */
$controller = Injector::inst()->create(CMSPageAddController::class);

// pass current request to newly created controller
Expand Down
10 changes: 6 additions & 4 deletions src/Model/Lumberjack.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
* @subpackage lumberjack
*
* @author Michael Strong <mstrong@silverstripe.org>
*
* @extends SiteTreeExtension<SiteTree&static>
*/
class Lumberjack extends SiteTreeExtension
{
Expand Down Expand Up @@ -76,7 +78,7 @@ public function updateCMSFields(FieldList $fields)
*
* @param bool $showAll Include all of the elements, even those not shown in the menus. Only applicable when
* extension is applied to {@link SiteTree}.
* @return DataList
* @return DataList<SiteTree>
*/
public function stageChildren($showAll = false)
{
Expand Down Expand Up @@ -111,7 +113,7 @@ public function stageChildren($showAll = false)
* instance from the original.
*
* @param DataList $list
* @return DataList
* @return DataList<SiteTree>
*/
protected function excludeSiteTreeClassNames($list)
{
Expand All @@ -129,7 +131,7 @@ protected function excludeSiteTreeClassNames($list)
* @param bool $showAll Include all of the elements, even those not shown in the menus. Only
* applicable when extension is applied to {@link SiteTree}.
* @param bool $onlyDeletedFromStage Only return items that have been deleted from stage
* @return DataList
* @return DataList<SiteTree>
* @throws Exception
*/
public function liveChildren($showAll = false, $onlyDeletedFromStage = false)
Expand Down Expand Up @@ -223,7 +225,7 @@ protected function shouldFilter()
* This also allows the owner class to override this method, e.g. to provide custom ordering.
*
* @var array $excluded List of class names excluded from the SiteTree
* @return DataList
* @return DataList<SiteTree>
*/
public function getLumberjackPagesForGridfield($excluded = array())
{
Expand Down