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:

I had a look at how XF handles post reporting and came up with this in my TLS/Thoughts/Report/Thought.php:
PHP:
Read more
I have created the content type in the ACP like this:

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