function module_builder_node_export in Module Builder 6
1 string reference to 'module_builder_node_export'
File
- ./
module_builder.components.inc, line 184
Code
function module_builder_node_export($values, $module) {
$output = "";
if (isset($values->integration) && $values->integration == 1) {
$output .= module_builder_add_hook('nodeapi', $module);
}
if (isset($values->types) && count($values->types)) {
$output .= "/**\n * Implementation of hook_node_info().\n */\nfunction " . $module->machine . "_node_info() {\n return array(\n";
foreach ($values->types as $type) {
if (!empty($type['machine']) && $type['machine'] != "N") {
$output .= " '" . $type['machine'] . "' => array(,\n";
$output .= " 'name' => t('" . $type['name'] . "'),\n";
$output .= " 'module' => '" . $module->machine . "',\n";
$output .= " 'description' => t('" . $type['description'] . "'),\n";
$output .= " 'locked' => " . ($type['locked'] ? "TRUE" : "FALSE") . ",\n";
$output .= " ),\n";
}
}
$output .= " );\n}\n\n";
$output .= module_builder_add_hook('load', $module);
$output .= module_builder_add_hook('view', $module);
}
return $output;
}