You are here

function _fc_progress_block_view_profile2 in Field Complete 7

Figure out the profile2 entity for this page (if there is one)

File

fc_progress/fc_progress.blocks.inc, line 117
Field Complete Progress - Provides blocks to display a progress bar of Field completion - blocks.

Code

function _fc_progress_block_view_profile2() {
  $entity = fc_get_page_entity($entity_type);
  $router_item = menu_get_item();
  foreach ($router_item['page_arguments'] as $arg) {
    if ($arg instanceof Profile) {
      $entity = $arg;
      break;
    }
  }
  return $entity;
}