From fb5925b325252c57c365c2a0eb96ef70e5db2fd6 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Fri, 15 Dec 2023 11:58:32 +1300 Subject: [PATCH] MNT Update @methods on class docblocks --- code/Model/RedirectorPage.php | 4 ++-- code/Model/SiteTree.php | 7 ++----- code/Model/SiteTreeLink.php | 4 ++-- code/Model/SiteTreeLinkTracking.php | 2 +- code/Model/VirtualPage.php | 2 +- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/code/Model/RedirectorPage.php b/code/Model/RedirectorPage.php index 3be0545624..1aabd7634f 100644 --- a/code/Model/RedirectorPage.php +++ b/code/Model/RedirectorPage.php @@ -18,8 +18,8 @@ * @property string $RedirectionType Either 'Internal','External' or 'File' * @property string $ExternalURL URL to redirect to if $RedirectionType is 'External' * @property int $LinkToID - * @method SiteTree LinkTo() Page to link to if $RedirectionType is 'Internal' - * @method File LinkToFile() File to link to if $RedirectionType is 'File' + * @method SiteTree LinkTo() + * @method File LinkToFile() */ class RedirectorPage extends Page { diff --git a/code/Model/SiteTree.php b/code/Model/SiteTree.php index 46026bc348..46fed3e6d2 100755 --- a/code/Model/SiteTree.php +++ b/code/Model/SiteTree.php @@ -102,17 +102,14 @@ * @property bool $HasBrokenFile True if this page has a broken file shortcode * @property bool $HasBrokenLink True if this page has a broken page shortcode * - * @method ManyManyList ViewerGroups() List of groups that can view this object. - * @method ManyManyList EditorGroups() List of groups that can edit this object. - * @method SiteTree Parent() - * @method HasManyList|SiteTreeLink[] BackLinks() List of SiteTreeLink objects attached to this page - * * @mixin Hierarchy * @mixin Versioned * @mixin RecursivePublishable * @mixin SiteTreeLinkTracking Added via linktracking.yml to DataObject directly * @mixin FileLinkTracking Added via filetracking.yml in silverstripe/assets * @mixin InheritedPermissionsExtension + * @method HasManyList BackLinks() + * @method HasManyList VirtualPages() */ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvider, CMSPreviewable, Resettable, Flushable, MemberCacheFlusher { diff --git a/code/Model/SiteTreeLink.php b/code/Model/SiteTreeLink.php index c22eb1f658..e973c434d1 100644 --- a/code/Model/SiteTreeLink.php +++ b/code/Model/SiteTreeLink.php @@ -7,8 +7,8 @@ /** * Represents a link between a dataobject parent and a page in a HTML content area * - * @method DataObject Parent() Parent object - * @method SiteTree Linked() Page being linked to + * @method SiteTree Linked() + * @method DataObject Parent() */ class SiteTreeLink extends DataObject { diff --git a/code/Model/SiteTreeLinkTracking.php b/code/Model/SiteTreeLinkTracking.php index a779f912e4..15283596b2 100644 --- a/code/Model/SiteTreeLinkTracking.php +++ b/code/Model/SiteTreeLinkTracking.php @@ -27,7 +27,7 @@ * field to your `db` config and this extension will ensure it's flagged appropriately. * * @property DataObject|SiteTreeLinkTracking $owner - * @method ManyManyThroughList LinkTracking() List of site pages linked on this dataobject + * @method ManyManyThroughList LinkTracking() */ class SiteTreeLinkTracking extends DataExtension { diff --git a/code/Model/VirtualPage.php b/code/Model/VirtualPage.php index 143ffc76d4..41c5d266f2 100644 --- a/code/Model/VirtualPage.php +++ b/code/Model/VirtualPage.php @@ -21,8 +21,8 @@ * * Note: This Only duplicates $db fields and not the $has_one etc.. * - * @method SiteTree CopyContentFrom() * @property int $CopyContentFromID + * @method SiteTree CopyContentFrom() */ class VirtualPage extends Page {