function fc_progress_content_type_render in Field Complete 7
Render the content type.
1 string reference to 'fc_progress_content_type_render'
- fc_progress.inc in fc_progress/
plugins/ content_types/ fc_progress.inc - Plugin to handle field completeness.
File
- fc_progress/
plugins/ content_types/ fc_progress.inc, line 56 - Plugin to handle field completeness.
Code
function fc_progress_content_type_render($subtype, $conf, $panel_args, $context) {
if (empty($context) || empty($context->data)) {
return;
}
// Get things ready.
$entity_type = $subtype;
$entity_info = entity_get_info($entity_type);
$entity = $context->data;
$block = new stdClass();
$block->module = 'fc_progrss';
$block->title = t('@title Progress', array(
'@title' => entity_label($entity_type, $entity),
));
$block->content = array(
'bar' => array(
'#theme' => 'fc_progress_bar',
'#entity_type' => $entity_type,
'#entity' => $entity,
),
'#attached' => array(
'css' => array(
drupal_get_path('module', 'fc_progress') . '/fc_progress.css',
),
),
);
if (!empty($conf['show_next'])) {
$block->content['next'] = array(
'#theme' => 'fc_progress_next',
'#entity_type' => $entity_type,
'#entity' => $entity,
);
}
$block->delta = $subtype;
return $block;
}