get_values_by_handler_and_field_variable( $sessionId, 'external_career_id' ); if ($item && isset($item['value']) && !empty($item['value'])) { // External career id $externalCareerId = $item['value']; // Getting career id from external career id $itemCareer = $extraFieldValueCareer->get_item_id_from_field_variable_and_field_value( 'external_career_id', $externalCareerId ); if ($itemCareer && !empty($itemCareer['item_id'])) { $careerId = $itemCareer['item_id']; $careerInfo = $career->find($careerId); if (!empty($careerInfo)) { $diagram = $extraFieldValueCareer->get_values_by_handler_and_field_variable( $careerId, 'career_diagram' ); if ($diagram && !empty($diagram['value'])) { /** @var Graph $graph */ $graph = UnserializeApi::unserialize('career', $diagram['value']); $content .= Career::renderDiagram($careerInfo, $graph); } } } } } } $view = new Template(''); $view->assign('content', $content); $view->display_one_col_template();