Skip to content

Commit

Permalink
Merge pull request #30 from wedevelopnl/fix/missing-use-statement
Browse files Browse the repository at this point in the history
Bring back missing use statement.
  • Loading branch information
erikfrerejean authored Jun 19, 2023
2 parents 20475df + 9d12c1f commit adffd1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/Pages/ArticlePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ public function getCMSFields(): FieldList
$fields->insertAfter(
'ArticleMetadata',
TagField::create(
'Themes',
_t('WeDevelop\Articles\Pages\ArticleThemePage.PLURALNAME', 'Themes'),
ArticleThemePage::get()->filter('ParentID', $this->ParentID),
$this->Themes()
)->setCanCreate(false)
'Themes',
_t('WeDevelop\Articles\Pages\ArticleThemePage.PLURALNAME', 'Themes'),
ArticleThemePage::get()->filter('ParentID', $this->ParentID),
$this->Themes()
)->setCanCreate(false)
);

$fields->insertAfter(
Expand Down
6 changes: 2 additions & 4 deletions src/Pages/ArticlesPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Restruct\Silverstripe\SiteTreeButtons\GridFieldAddNewSiteTreeItemButton;
use SilverStripe\Control\Controller;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldAddExistingAutocompleter;
use SilverStripe\Forms\GridField\GridFieldAddNewButton;
Expand Down Expand Up @@ -114,10 +115,7 @@ class ArticlesPage extends \Page
],
];

/**
* @return \SilverStripe\Forms\FieldList
*/
public function getCMSFields()
public function getCMSFields(): FieldList
{
$this->beforeUpdateCMSFields(function (FieldList $fields) {
$fields->addFieldToTab(
Expand Down

0 comments on commit adffd1e

Please sign in to comment.