I have a error saying that,
Fatal error: Call to a member function getId() on null on line 63
but how can i check the element, here is my code
54 public function edit($id) {
55  $form_group = $this->dm->find(Form_Group::class, $id);
56  if (empty($form_group)) {
57      $this->app->flash('error', 'Invalid record selected.');
58      $this->app->redirect($this->app->urlFor('form-group-list'));
59      die;
60  }
61
62  $record_company = $form_group->getCompany();
63  $enabled_modules = Common_Helper::get_enabled_modules($record_company->getId());
 
    