Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

[Solved] How can I set $Sender->EventArguments['Object'] elements to my own values.

peregrineperegrine MVP
edited August 2012 in Development

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.

Comments

Sign In or Register to comment.