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

MNT Update @methods on class docblocks #335

Merged
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
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\ManyManyThroughList<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