block_export_import.module in Block Export Import 7.2
Same filename and directory in other branches
The main file for the Block Export Import module.
The Block Export interface allows the user to select a single or multiple blocks to export/import.
@gmail.com>vendra Yadav <dev.firoza@gmail.com>
File
block_export_import.moduleView source
<?php
/**
* @file
* The main file for the Block Export Import module.
*
* The Block Export interface allows the user to select a single or multiple
* blocks to export/import.
*
* @gmail.com>vendra Yadav <dev.firoza@gmail.com>
*/
/**
* Implements hook_help().
*/
function block_export_import_help($path, $arg) {
$help = '';
switch ($path) {
case 'admin/help#block_export_import':
$help = check_markup(file_get_contents(dirname(__FILE__) . "/README.txt"));
break;
}
return $help;
}
/**
* Implements hook_menu().
*/
function block_export_import_menu() {
$items['admin/structure/block/export'] = array(
'title' => 'Export',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'block_export_import_blocks_export_form',
),
'access arguments' => array(
'administer blocks',
),
'type' => MENU_LOCAL_TASK,
'file' => 'includes/block.export.admin.inc',
'weight' => 50,
);
$items['admin/structure/export-import-block'] = array(
'title' => 'Blocks Export/Import',
'description' => 'Page to export/import blocks',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'block_export_import_blocks_export_form',
),
'access arguments' => array(
'administer blocks',
),
'type' => MENU_NORMAL_ITEM,
'file' => 'includes/block.export.admin.inc',
);
$items['admin/structure/export-import-block/export'] = array(
'title' => 'Export',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -1,
);
$items['admin/structure/export-import-block/import'] = array(
'title' => 'Import',
'description' => 'Page to import blocks',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'block_export_import_blocks_import_form',
),
'access arguments' => array(
'administer blocks',
),
'type' => MENU_LOCAL_TASK,
'file' => 'includes/block.import.admin.inc',
);
return $items;
}
/**
* This is use to fetch fields list from block table.
*
* @return array
* An block table fields array.
*/
function _block_export_import_get_block_schema_fields() {
$block_schema = drupal_get_schema('block');
$block_schema_fields = array_keys($block_schema['fields']);
return $block_schema_fields;
}
Functions
Name![]() |
Description |
---|---|
block_export_import_help | Implements hook_help(). |
block_export_import_menu | Implements hook_menu(). |
_block_export_import_get_block_schema_fields | This is use to fetch fields list from block table. |