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

ENH Add generic types #130

Merged
merged 1 commit into from
Jan 22, 2024
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: 2 additions & 1 deletion src/Extension/CustomHtmlEditorField.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
/**
* @todo rename file to match class name
* @todo investigate updated HTMLEditorField_Toolbar changes, and find new implementation
*
* @extends Extension<\HtmlEditorField_Toolbar>
*/
class CustomHtmlEditorFieldToolbar extends Extension
{

/**
* @param Form $form
* @return void
Expand Down
5 changes: 4 additions & 1 deletion src/Extension/CwpHtmlEditorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
namespace CWP\Core\Extension;

use SilverStripe\ORM\DataExtension;
use SilverStripe\Security\Group;

/**
* @extends DataExtension<Group>
*/
class CwpHtmlEditorConfig extends DataExtension
{

/**
* @return string
*
Expand Down
7 changes: 2 additions & 5 deletions src/Extension/LoginAttemptNotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@
* TODO: bug when using default admin - always shows the message...
* Requires Security::login_recording config to be set to true.
*
* @property LeftAndMain $owner
* @extends Extension<LeftAndMain>
*/
class LoginAttemptNotifications extends Extension
{

/**
*
* @return mixed null
* @return mixed
*/
public function init()
{

// Exclude default admin.
$member = Security::getCurrentUser();
if (!$member || !$member->ID) {
Expand Down
4 changes: 3 additions & 1 deletion src/Extension/RichLinksExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use SilverStripe\Core\Extension;
use SilverStripe\ORM\DataObject;
use SilverStripe\Assets\File;
use SilverStripe\ORM\FieldType\DBField;

/**
* Adds capability to augment links with extra attributes and meta information.
Expand All @@ -13,10 +14,11 @@
* $Content.RichLinks
*
* Note: will only work with content produced by HtmlEditorField.
*
* @extends Extension<DBField>
*/
class RichLinksExtension extends Extension
{

/**
* @var array
*/
Expand Down