Skip to content

Commit

Permalink
ENH Add generic types
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Jan 12, 2024
1 parent ec55daa commit 1c89ad0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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 <[email protected]>
*
* @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

0 comments on commit 1c89ad0

Please sign in to comment.