function social_content_linkedin_create_fields in Social Content 7.2
Returns a structured array defining the fields created by this content type.
Return value
array An associative array specifying the fields we wish to add to our new node type.
1 call to social_content_linkedin_create_fields()
- social_content_linkedin_install in modules/
linkedin/ social_content_linkedin.install - Implements hook_install().
File
- modules/
linkedin/ social_content_linkedin.fields.inc, line 16 - Fields for the `Linkedin` content type.
Code
function social_content_linkedin_create_fields() {
return array(
'field_linkedin_picture' => array(
'translatable' => '0',
'entity_types' => array(),
'settings' => array(
'uri_scheme' => 'public',
'default_image' => 0,
),
'storage' => array(
'type' => 'field_sql_storage',
'settings' => array(),
'module' => 'field_sql_storage',
'active' => '1',
'details' => array(
'sql' => array(
'FIELD_LOAD_CURRENT' => array(
'field_data_field_linkedin_picture' => array(
'fid' => 'field_linkedin_picture_fid',
'alt' => 'field_linkedin_picture_alt',
'title' => 'field_linkedin_picture_title',
'width' => 'field_linkedin_picture_width',
'height' => 'field_linkedin_picture_height',
),
),
'FIELD_LOAD_REVISION' => array(
'field_revision_field_linkedin_picture' => array(
'fid' => 'field_linkedin_picture_fid',
'alt' => 'field_linkedin_picture_alt',
'title' => 'field_linkedin_picture_title',
'width' => 'field_linkedin_picture_width',
'height' => 'field_linkedin_picture_height',
),
),
),
),
),
'foreign keys' => array(
'fid' => array(
'table' => 'file_managed',
'columns' => array(
'fid' => 'fid',
),
),
),
'indexes' => array(
'fid' => array(
'fid',
),
),
'field_name' => 'field_linkedin_picture',
'type' => 'image',
'module' => 'image',
'active' => '1',
'locked' => '0',
'cardinality' => '1',
'deleted' => '0',
'columns' => array(
'fid' => array(
'description' => 'The {file_managed}.fid being referenced in this field.',
'type' => 'int',
'not null' => FALSE,
'unsigned' => TRUE,
),
'alt' => array(
'description' => "Alternative image text, for the image's 'alt' attribute.",
'type' => 'varchar',
'length' => 512,
'not null' => FALSE,
),
'title' => array(
'description' => "Image title text, for the image's 'title' attribute.",
'type' => 'varchar',
'length' => 1024,
'not null' => FALSE,
),
'width' => array(
'description' => 'The width of the image in pixels.',
'type' => 'int',
'unsigned' => TRUE,
),
'height' => array(
'description' => 'The height of the image in pixels.',
'type' => 'int',
'unsigned' => TRUE,
),
),
'bundles' => array(
'node' => array(
'linkedin',
),
),
),
'field_linkedin_link' => array(
'translatable' => '0',
'entity_types' => array(),
'settings' => array(
'attributes' => array(
'target' => 'default',
'class' => '',
'rel' => '',
),
'url' => 0,
'title' => 'optional',
'title_value' => '',
'title_maxlength' => 128,
'enable_tokens' => 1,
'display' => array(
'url_cutoff' => 80,
),
),
'storage' => array(
'type' => 'field_sql_storage',
'settings' => array(),
'module' => 'field_sql_storage',
'active' => '1',
'details' => array(
'sql' => array(
'FIELD_LOAD_CURRENT' => array(
'field_data_field_linkedin_link' => array(
'url' => 'field_linkedin_link_url',
'title' => 'field_linkedin_link_title',
'attributes' => 'field_linkedin_link_attributes',
),
),
'FIELD_LOAD_REVISION' => array(
'field_revision_field_linkedin_link' => array(
'url' => 'field_linkedin_link_url',
'title' => 'field_linkedin_link_title',
'attributes' => 'field_linkedin_link_attributes',
),
),
),
),
),
'foreign keys' => array(),
'indexes' => array(),
'field_name' => 'field_linkedin_link',
'type' => 'link_field',
'module' => 'link',
'active' => '1',
'locked' => '0',
'cardinality' => '1',
'deleted' => '0',
'columns' => array(
'url' => array(
'type' => 'varchar',
'length' => 2048,
'not null' => FALSE,
'sortable' => TRUE,
),
'title' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'sortable' => TRUE,
),
'attributes' => array(
'type' => 'text',
'size' => 'medium',
'not null' => FALSE,
),
),
'bundles' => array(
'node' => array(
'linkedin',
),
),
),
'field_linkedin_update_link' => array(
'translatable' => '0',
'entity_types' => array(),
'settings' => array(
'attributes' => array(
'target' => 'default',
'class' => '',
'rel' => '',
),
'url' => 0,
'title' => 'optional',
'title_value' => '',
'title_maxlength' => 128,
'enable_tokens' => 1,
'display' => array(
'url_cutoff' => 80,
),
),
'storage' => array(
'type' => 'field_sql_storage',
'settings' => array(),
'module' => 'field_sql_storage',
'active' => '1',
'details' => array(
'sql' => array(
'FIELD_LOAD_CURRENT' => array(
'field_data_field_linkedin_update_link' => array(
'url' => 'field_linkedin_update_link_url',
'title' => 'field_linkedin_update_link_title',
'attributes' => 'field_linkedin_update_link_attributes',
),
),
'FIELD_LOAD_REVISION' => array(
'field_revision_field_linkedin_update_link' => array(
'url' => 'field_linkedin_update_link_url',
'title' => 'field_linkedin_update_link_title',
'attributes' => 'field_linkedin_update_link_attributes',
),
),
),
),
),
'foreign keys' => array(),
'indexes' => array(),
'field_name' => 'field_linkedin_update_link',
'type' => 'link_field',
'module' => 'link',
'active' => '1',
'locked' => '0',
'cardinality' => '1',
'deleted' => '0',
'columns' => array(
'url' => array(
'type' => 'varchar',
'length' => 2048,
'not null' => FALSE,
'sortable' => TRUE,
),
'title' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'sortable' => TRUE,
),
'attributes' => array(
'type' => 'text',
'size' => 'medium',
'not null' => FALSE,
),
),
'bundles' => array(
'node' => array(
'linkedin',
),
),
),
'field_linkedin_external_id' => array(
'translatable' => '0',
'entity_types' => array(),
'settings' => array(
'max_length' => '255',
),
'storage' => array(
'type' => 'field_sql_storage',
'settings' => array(),
'module' => 'field_sql_storage',
'active' => '1',
'details' => array(
'sql' => array(
'FIELD_LOAD_CURRENT' => array(
'field_data_field_linkedin_external_id' => array(
'value' => 'field_linkedin_external_id_value',
'format' => 'field_linkedin_external_id_format',
),
),
'FIELD_LOAD_REVISION' => array(
'field_revision_field_linkedin_external_id' => array(
'value' => 'field_linkedin_external_id_value',
'format' => 'field_linkedin_external_id_format',
),
),
),
),
),
'foreign keys' => array(
'format' => array(
'table' => 'filter_format',
'columns' => array(
'format' => 'format',
),
),
),
'indexes' => array(
'format' => array(
'format',
),
),
'field_name' => 'field_linkedin_external_id',
'type' => 'text',
'module' => 'text',
'active' => '1',
'locked' => '0',
'cardinality' => '1',
'deleted' => '0',
'columns' => array(
'value' => array(
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
),
'format' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
),
),
'bundles' => array(
'node' => array(
'linkedin',
),
),
),
);
}