Using the report handler

L

Lee

Guest
Member
I have implemented the report handler for a custom content type.

I have created the content type in the ACP like this:
1641391743889.png

I had a look at how XF handles post reporting and came up with this in my TLS/Thoughts/Report/Thought.php:
PHP:

Code:
<?php

namespace TLS\Thoughts\Report;

use XF\Entity\Report;
use XF\Mvc\Entity\Entity;
use XF\Report\AbstractHandler;

class Thought extends AbstractHandler
{

    protected function canViewContent(Report $report)
    {
        return true;
    }...

Read more
 
BlackSpigot General Chat
Rules Help Users
    D @ devicedeals: how do i post threads in the rss forum
    Top