Skip to content

Commit

Permalink
ENH Add generic types (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Jan 22, 2024
1 parent 3ff115b commit 8f82353
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
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

0 comments on commit 8f82353

Please sign in to comment.