You are here

function fb_instant_articles_display_get_layout_settings in Facebook Instant Articles 7.2

Get the layout settings for a specific bundle.

@todo Add update hook to change export ID, and note this in the API changelog.

Parameters

string $entity_type:

string $bundle_name:

Return value

stdClass

2 calls to fb_instant_articles_display_get_layout_settings()
fb_instant_articles_display_field_formatter_view in modules/fb_instant_articles_display/includes/field.inc
Implements hook_field_formatter_view().
fb_instant_articles_display_layout_form in modules/fb_instant_articles_display/includes/view_mode_layout.inc
Includes Facebook Instant Articles Display View Mode elements.

File

modules/fb_instant_articles_display/fb_instant_articles_display.module, line 354
Hook implementations for Facebook Instant Articles Display module.

Code

function fb_instant_articles_display_get_layout_settings($entity_type, $bundle_name) {
  ctools_include('export');
  $export_id = $entity_type . '|' . $bundle_name . '|fb_instant_article';
  $layout_settings = ctools_export_crud_load_all('fb_instant_articles_display_layout_settings');
  $layout = new stdClass();
  if (isset($layout_settings[$export_id])) {
    $layout = $layout_settings[$export_id];
  }
  return $layout;
}