Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

In this Discussion

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

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?


factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

Comments

Sign In or Register to comment.