You are here

function block_inject_add_region in Block Inject 7

Adds a new region to the database

Parameters

string $region: The region name.

string $node_type: The machine readable node type name it applies for.

string $node_type_name: The human readable node type name it applies for.

string $condition: Serialized array for the condition.

1 call to block_inject_add_region()
block_inject_add_inject_form_submit in ./block_inject.admin.inc
Submit form that adds the new region to the database.

File

./block_inject.module, line 433
The Block Inject module functions.

Code

function block_inject_add_region($region, $node_type, $node_type_name, $condition = NULL) {
  $insert = db_insert('block_inject')
    ->fields(array(
    'region' => $region,
    'node_type' => $node_type,
    'node_name' => $node_type_name,
    'bi_condition' => $condition,
  ))
    ->execute();
}