mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
ENH Add generic types (#220)
This commit is contained in:
parent
21ed224d5a
commit
f04e9fa4ca
@ -4,6 +4,7 @@ namespace SilverStripe\ContentReview\Extensions;
|
||||
|
||||
use SilverStripe\Admin\LeftAndMain;
|
||||
use SilverStripe\Admin\LeftAndMainExtension;
|
||||
use SilverStripe\CMS\Controllers\CMSMain;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\ContentReview\Forms\ReviewContentHandler;
|
||||
use SilverStripe\ContentReview\Traits\PermissionChecker;
|
||||
@ -17,6 +18,8 @@ use SilverStripe\Security\Security;
|
||||
/**
|
||||
* CMSPageEditController extension to receive the additional action button from
|
||||
* SiteTreeContentReview::updateCMSActions()
|
||||
*
|
||||
* @extends LeftAndMainExtension<CMSMain>
|
||||
*/
|
||||
class ContentReviewCMSExtension extends LeftAndMainExtension
|
||||
{
|
||||
|
@ -14,6 +14,7 @@ use SilverStripe\ORM\DataExtension;
|
||||
use SilverStripe\Security\Group;
|
||||
use SilverStripe\Security\Member;
|
||||
use SilverStripe\Security\Permission;
|
||||
use SilverStripe\SiteConfig\SiteConfig;
|
||||
|
||||
/**
|
||||
* This extensions add a default schema for new pages and pages without a content
|
||||
@ -22,6 +23,8 @@ use SilverStripe\Security\Permission;
|
||||
* @property int $ReviewPeriodDays
|
||||
* @method SilverStripe\ORM\ManyManyList<Group> ContentReviewGroups()
|
||||
* @method SilverStripe\ORM\ManyManyList<Member> ContentReviewUsers()
|
||||
*
|
||||
* @extends DataExtension<SiteConfig>
|
||||
*/
|
||||
class ContentReviewDefaultSettings extends DataExtension
|
||||
{
|
||||
@ -88,7 +91,7 @@ class ContentReviewDefaultSettings extends DataExtension
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ManyManyList
|
||||
* @return ManyManyList<Group>
|
||||
*/
|
||||
public function OwnerGroups()
|
||||
{
|
||||
@ -96,7 +99,7 @@ class ContentReviewDefaultSettings extends DataExtension
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ManyManyList
|
||||
* @return ManyManyList<Member>
|
||||
*/
|
||||
public function OwnerUsers()
|
||||
{
|
||||
@ -180,7 +183,7 @@ class ContentReviewDefaultSettings extends DataExtension
|
||||
* Get all Members that are default Content Owners. This includes checking group hierarchy
|
||||
* and adding any direct users.
|
||||
*
|
||||
* @return ArrayList
|
||||
* @return ArrayList<Group|Member>
|
||||
*/
|
||||
public function ContentReviewOwners()
|
||||
{
|
||||
|
@ -2,8 +2,12 @@
|
||||
|
||||
namespace SilverStripe\ContentReview\Extensions;
|
||||
|
||||
use SilverStripe\Admin\LeftAndMain;
|
||||
use SilverStripe\Admin\LeftAndMainExtension;
|
||||
|
||||
/**
|
||||
* @extends LeftAndMainExtension<LeftAndMain>
|
||||
*/
|
||||
class ContentReviewLeftAndMainExtension extends LeftAndMainExtension
|
||||
{
|
||||
/**
|
||||
|
@ -5,9 +5,13 @@ namespace SilverStripe\ContentReview\Extensions;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
use SilverStripe\Security\Group;
|
||||
use SilverStripe\Security\Member;
|
||||
|
||||
/**
|
||||
* @method SilverStripe\ORM\ManyManyList<SiteTree> SiteTreeContentReview()
|
||||
*
|
||||
* @extends DataExtension<Group|Member>
|
||||
*/
|
||||
class ContentReviewOwner extends DataExtension
|
||||
{
|
||||
|
@ -53,6 +53,8 @@ use Symbiote\QueuedJobs\Services\QueuedJobService;
|
||||
* @method SilverStripe\ORM\ManyManyList<Group> ContentReviewGroups()
|
||||
* @method SilverStripe\ORM\ManyManyList<Member> ContentReviewUsers()
|
||||
* @method SilverStripe\ORM\HasManyList<ContentReviewLog> ReviewLogs()
|
||||
*
|
||||
* @extends DataExtension<SiteTree>
|
||||
*/
|
||||
class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
||||
{
|
||||
@ -119,7 +121,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
||||
* @param SS_List $groups
|
||||
* @param SS_List $members
|
||||
*
|
||||
* @return ArrayList
|
||||
* @return ArrayList<Group|Member>
|
||||
*/
|
||||
public static function merge_owners(SS_List $groups, SS_List $members)
|
||||
{
|
||||
@ -293,7 +295,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
||||
* Get all Members that are Content Owners to this page. This includes checking group
|
||||
* hierarchy and adding any direct users.
|
||||
*
|
||||
* @return ArrayList
|
||||
* @return ArrayList<Group|Member>
|
||||
*/
|
||||
public function ContentReviewOwners()
|
||||
{
|
||||
@ -304,7 +306,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ManyManyList
|
||||
* @return ManyManyList<Group>
|
||||
*/
|
||||
public function OwnerGroups()
|
||||
{
|
||||
@ -312,7 +314,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ManyManyList
|
||||
* @return ManyManyList<Member>
|
||||
*/
|
||||
public function OwnerUsers()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user