BP_Reply_By_Email_Extension::extend_activity_listener PHP Method

extend_activity_listener() public method

Override this in your class if your 'item_id' / 'secondary_item_id' needs to be calculated in a different manner. If your plugin doesn't rely on the activity component, you will probably want to override this method and make it an empty method.
public extend_activity_listener ( obj $listener, obj $item )
$listener obj Registers your component with RBE's activity listener
$item obj The activity object generated by BP during save.
    public function extend_activity_listener($listener, $item)
    {
        if (!empty($this->activity_type) && $item->type == $this->activity_type) {
            $listener->component = $this->id;
            $listener->item_id = $item->item_id;
            $listener->user_id = $item->user_id;
            if (!empty($this->secondary_item_id_param)) {
                $listener->secondary_item_id = $item->secondary_item_id;
            }
        }
    }