XF 2.0 Set the controller for an existing template

canina

Member
I created a new table (which has nothing to do with other tables), and of course I built a new entity, and then I made a new controller.
But unlike the example shown here in the tutorial, the new controller is not supposed to send the data to a new HTML format, but to an existing template (I edit) forum_post_quick_thread (because I am changing and adding the display there).

Where should I turn the controller? And how?

In the meantime I did this (which is for some reason not good ..)
Code:
public function actionClassifications()
    {
        
        $repo = $this->repository('BoardOfProfessionals:BOPClassifications');

        $finder = $repo->findClassificationsForBoardOfProfessionalsView();

        $viewParamsBoard = [
            'featuredThreads' => $finder->fetch()
            ];
      //  echo json_encode ($viewParams);
      return $this->view('forum_post_quick_thread:View', 'forum_post_quick_thread_view', $viewParamsBoard);

    }

Thanks in advance.
 
I think maybe the reason is this:
In the tutorial it says that you need to create a listener of code events after an entity is expanded. But in the present case the entity is new so it probably is not imported at all ... (because I did not know how to attach it)
If I am right then the question is probably how to teach the system that there is a new entity in the environment ...?

Thanks for the help..
 
Can someone refer me to add-on, for example, that I can use it example?
I repeat: What I need is access to the table (and create a new entity), without using with other entities
Thanks in advance.
 
Top Bottom