You are here

function fb_instant_articles_display_get_fields in Facebook Instant Articles 7

Same name and namespace in other branches
  1. 7.2 modules/fb_instant_articles_display/includes/view_mode_layout.inc \fb_instant_articles_display_get_fields()

Gets all fields.

Parameters

string $entity_type: The name of the entity.

bool $cache: Whether we need to get the fields from cache or not.

Return value

array Collection of fields.

1 call to fb_instant_articles_display_get_fields()
fb_instant_articles_display_field_ui_fields in modules/fb_instant_articles_display/includes/view_mode_layout.inc
Adds the fields to the Field UI form.

File

modules/fb_instant_articles_display/includes/view_mode_layout.inc, line 391
View mode layout functions for Facebook Instant Articles Display.

Code

function fb_instant_articles_display_get_fields($entity_type, $cache = TRUE) {
  $fields = array(
    'node' => array(
      'title' => array(
        'title' => t('Title'),
        'field_type' => 2,
        'properties' => array(
          'entity_render_key' => 'title',
          'settings' => array(
            'link' => array(
              'type' => 'select',
              'options' => array(
                'no',
                'yes',
              ),
            ),
            'wrapper' => array(
              'type' => 'textfield',
              'description' => t('Eg: h1, h2, p'),
            ),
            'class' => array(
              'type' => 'textfield',
              'description' => t('Put a class on the wrapper. Eg: block-title'),
            ),
          ),
          'default' => array(
            'wrapper' => 'h2',
            'link' => 0,
            'class' => '',
          ),
        ),
      ),
    ),
  );
  return $fields[$entity_type];
}