I have to change an existing add-on; i want to make it short and simple.
The easiest way is to inject a class where have a function like:
public function assertSomething($content)
I have to check now if content is $thread (could be $profilePost or $userProfile also)
I do this with
if ($content->node_id AND $content->thread_id)
{
is there another way?
The easiest way is to inject a class where have a function like:
public function assertSomething($content)
I have to check now if content is $thread (could be $profilePost or $userProfile also)
I do this with
if ($content->node_id AND $content->thread_id)
{
is there another way?