CMTV
Well-known member
I extended
Then I extended
How can I call my custom
I guess I need to somehow cast
Do I need to use
Thread
entity and added custom method canSolve()
.Then I extended
Thread
controller with actionSolve(ParameterBug $pb)
method:
PHP:
public function actionSolve(ParameterBag $pb)
{
$thread = $this->assertViewableThread($pb->thread_id);
/* There is no such a method in XF\Entity\Thread class! */
$thread->canSolve();
}
canSolve()
method?I guess I need to somehow cast
XF\Entity\Thread
object to MyPluginID\XF\Entity\Thread
in order to use my method.Do I need to use
getRelationOrDefault(...)
here?