function flexiform_edit_pane_content_type_render in Flexiform 7
Render the custom content type.
File
- plugins/
content_types/ edit_pane.inc, line 99 - Plugin to handle attached entity content types
Code
function flexiform_edit_pane_content_type_render($subtype, $conf, $panel_args, $context) {
if (empty($context) || empty($context->data)) {
return;
}
$display_context = array(
'base_entity' => $context,
);
$flexiform = entity_load_single('flexiform', $subtype);
if (!$flexiform
->getDisplay('FlexiformDisplayEditPane')
->access($display_context)) {
return;
}
$content = $flexiform
->getDisplay('FlexiformDisplayEditPane')
->build($display_context);
$title = $flexiform
->getDisplay('FlexiformDisplayEditPane')
->title($display_context);
// Build the content type block.
$block = new stdClass();
$block->module = 'flexiform';
$block->title = $title;
$block->content = $content;
$block->delta = $subtype;
return $block;
}