You are here

function ctools_content_type_new in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 ctools_custom_content/ctools_custom_content.module \ctools_content_type_new()

Create callback for creating a new CTools custom content type.

This ensures we get proper defaults from the plugin for its settings.

1 string reference to 'ctools_content_type_new'
ctools_custom_content_schema_1 in ctools_custom_content/ctools_custom_content.install

File

ctools_custom_content/ctools_custom_content.module, line 41
ctools_custom_content module

Code

function ctools_content_type_new($set_defaults) {
  $item = ctools_export_new_object('ctools_custom_content', $set_defaults);
  ctools_include('content');
  $plugin = ctools_get_content_type('custom');
  $item->settings = ctools_content_get_defaults($plugin, array());
  return $item;
}