You are here

function _fc_incomplete_block_view in Field Complete 7

Implements hook_block_view().

1 call to _fc_incomplete_block_view()
fc_incomplete_block_view in fc_incomplete/fc_incomplete.module
Implements hook_block_view().

File

fc_incomplete/fc_incomplete.blocks.inc, line 10
Field Incomplete - Provides a block displaying of what's currently incomplete on an entity - blocks.

Code

function _fc_incomplete_block_view($entity_type) {
  if (fc_entity_is_enabled($entity_type)) {
    $entity = fc_get_page_entity($entity_type);

    // No entity available, so skip it.
    if (empty($entity)) {
      return array();
    }
    module_load_include('inc', 'fc_incomplete');
    $entity_info = entity_get_info($entity_type);
    return array(
      'subject' => t('Incomplete items'),
      'content' => fc_incomplete_build($entity_type, $entity)
        ->render(),
    );
  }
}