HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
[Solved] How can I set $Sender->EventArguments['Object'] elements to my own values.
peregrine
MVP
I am retrieving FormatBody in a plugin via this function
public function DiscussionController_AfterCommentFormat_Handler($Sender) { $Object = $Sender->EventArguments['Object']; $Body = $Object->FormatBody;
....
now I want to modify $Body and truncate.
works fine
Ideally if there is a way to do something like this (I know it is incorrect code)
$Object->FormatBody = "";
$Sender->EventArguments['Object'] = $Object
But I don't want to have the original $Object->FormatBody; printing
short of modifying the helper functions and commenting out // echo $Object->FormatBody;
Any other ideas of what can be done?
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
0
Comments
solved. duh!
$Object->FormatBody = $newtext;
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.