entity_block.install in Entity Blocks 7
Install hooks for entity_block.
File
entity_block.installView source
<?php
/**
* @file
* Install hooks for entity_block.
*/
/**
* Implements hook_schema().
*/
function entity_block_schema() {
$schema = array();
$schema['entity_block'] = array(
'description' => 'Base table for entity block.',
'fields' => array(
'entity_block_id' => array(
'description' => 'Primary key of an entity block.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'bundle' => array(
'description' => 'The entity bundle',
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
),
'title' => array(
'description' => 'The entity block title',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'target_entity_type' => array(
'description' => 'The target entity type',
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
),
'target_bundle' => array(
'description' => 'The target entity bundle',
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
),
'target_view_mode' => array(
'description' => 'The target entity view mode',
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
),
'target_entity_id' => array(
'description' => 'The target entity id',
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
'default' => NULL,
),
),
'primary key' => array(
'entity_block_id',
),
);
return $schema;
}
Functions
Name | Description |
---|---|
entity_block_schema | Implements hook_schema(). |