Skip to content

Commit

Permalink
MNT Update @methods on class docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Dec 14, 2023
1 parent 022fb8a commit 7b3f664
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Extensions/TaxonomyTermExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\GridField\GridFieldAddNewButton;

/**
* @method SilverStripe\ORM\ManyManyList<BasePage> Pages()
*/
class TaxonomyTermExtension extends DataExtension
{

Expand Down
2 changes: 1 addition & 1 deletion src/Model/Quicklink.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
use SilverStripe\ORM\DataObject;

/**
* @method BaseHomePage Parent()
* @method SiteTree InternalLink()
* @method BaseHomePage Parent()
*/
class Quicklink extends DataObject
{
Expand Down
4 changes: 4 additions & 0 deletions src/Model/RelatedPageLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
use SilverStripe\ORM\DataObject;
use SilverStripe\Versioned\Versioned;

/**
* @method BasePage BasePage()
* @method BasePage Child()
*/
class RelatedPageLink extends DataObject
{
private static $table_name = 'BasePage_RelatedPages';
Expand Down
4 changes: 4 additions & 0 deletions src/PageTypes/BaseHomePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
* **BaseHomePage** is the basic home page.
* By default it is hidden from the CMS - we rely on developers creating their own
* `HomePage` class in the `mysite/code` which will extend from the **BaseHomePage**.
* @method SiteTree FeatureOneLink()
* @method SiteTree FeatureTwoLink()
* @method SiteTree LearnMorePage()
* @method SilverStripe\ORM\HasManyList<Quicklink> Quicklinks()
*/
class BaseHomePage extends Page
{
Expand Down
3 changes: 3 additions & 0 deletions src/PageTypes/BasePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
* Please note: you should generally always extend `Page` with your custom page types. Refrain from subclassing
* `BasePage` directly. Doing so will omit `Page` from your custom class's hierarchy, and this can have unintended
* side effects where modules rely on modifying things on the `Page` class, as well as with templates and themes.
* @method SilverStripe\ORM\ManyManyList<BasePage> RelatedPagesThrough()
* @method SilverStripe\ORM\ManyManyList<BasePage> SimilarPages()
* @method SilverStripe\ORM\ManyManyList<TaxonomyTerm> Terms()
*/

class BasePage extends SiteTree
Expand Down
3 changes: 3 additions & 0 deletions src/PageTypes/NewsPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
use SilverStripe\Forms\TextField;
use SilverStripe\ORM\FieldType\DBField;

/**
* @method Image FeaturedImage()
*/
class NewsPage extends DatedUpdatePage
{
private static $description = 'Describes an item of news';
Expand Down

0 comments on commit 7b3f664

Please sign in to comment.