-
Notifications
You must be signed in to change notification settings - Fork 822
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
FIX: Fixes #4376 partially added missing doc blocks. #8728
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -60,22 +60,52 @@ public function augmentWrite(&$manipulation) | |||||||||||||||
{ | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
/** | ||||||||||||||||
* Optional extension hook called by SilverStripe directly before a database write operation. | ||||||||||||||||
* Any logic expressed here, will be executed by SilverStripe. | ||||||||||||||||
* | ||||||||||||||||
* @return void | ||||||||||||||||
*/ | ||||||||||||||||
public function onBeforeWrite() | ||||||||||||||||
{ | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
/** | ||||||||||||||||
* Optional extension hook called by SilverStripe directly after a database write operation. | ||||||||||||||||
* Any logic expressed here, will be executed by SilverStripe. | ||||||||||||||||
* | ||||||||||||||||
* @return void | ||||||||||||||||
*/ | ||||||||||||||||
public function onAfterWrite() | ||||||||||||||||
{ | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
/** | ||||||||||||||||
* Optional extension hook called by SilverStripe directly before deleting a database write operation. | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think this might be a result of a copy/paste, would you mind updating it to say something like "directly before deleting a DataObject" or something like that? |
||||||||||||||||
* Any logic expressed here, will be executed by SilverStripe. | ||||||||||||||||
* | ||||||||||||||||
* @return void | ||||||||||||||||
*/ | ||||||||||||||||
public function onBeforeDelete() | ||||||||||||||||
{ | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
/** | ||||||||||||||||
* Optional extension hook called by SilverStripe directly after deleting a database write operation. | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As with onBeforeDelete, I think the end of this sentence could be adjusted slightly |
||||||||||||||||
* Any logic expressed here, will be executed by SilverStripe. | ||||||||||||||||
* | ||||||||||||||||
* @return void | ||||||||||||||||
*/ | ||||||||||||||||
public function onAfterDelete() | ||||||||||||||||
{ | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
/** | ||||||||||||||||
* Optional extension hook called by SilverStripe directly during a dev/build operation. | ||||||||||||||||
* Any logic expressed here, will be executed by SilverStripe. | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's the doc block from /**
* Add default records to database. This function is called whenever the
* database is built, after the database tables have all been created. Overload
* this to add default records when the database is built, but make sure you
* call parent::requireDefaultRecords().
*
* @uses DataExtension->requireDefaultRecords()
*/ Perhaps you could use that and adjust it to communicate that it's run in an extension as opposed to directly on the object? |
||||||||||||||||
* | ||||||||||||||||
* @return void | ||||||||||||||||
*/ | ||||||||||||||||
public function requireDefaultRecords() | ||||||||||||||||
{ | ||||||||||||||||
} | ||||||||||||||||
|
@@ -84,18 +114,37 @@ public function populateDefaults() | |||||||||||||||
{ | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
|
||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
public function can($member) | ||||||||||||||||
{ | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
/** | ||||||||||||||||
* Whether or not the given $member is able to edit this decorated object. | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
* | ||||||||||||||||
* @param Member $member | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to import the namespace for Member as well, up the top of the file: |
||||||||||||||||
* @return bool | ||||||||||||||||
*/ | ||||||||||||||||
public function canEdit($member) | ||||||||||||||||
{ | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
/** | ||||||||||||||||
* Whether or not the given $member is able to delete this decorated object. | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
* | ||||||||||||||||
* @param Member $member | ||||||||||||||||
* @return bool | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically these methods return |
||||||||||||||||
*/ | ||||||||||||||||
public function canDelete($member) | ||||||||||||||||
{ | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
/** | ||||||||||||||||
* Whether or not the given $member is able to create this decorated object. | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
* | ||||||||||||||||
* @param Member $member | ||||||||||||||||
* @return bool | ||||||||||||||||
*/ | ||||||||||||||||
public function canCreate($member) | ||||||||||||||||
{ | ||||||||||||||||
} | ||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we need this sentence to be honest