function sweaver_ctools_object_list in Sweaver 7
Same name and namespace in other branches
- 6 sweaver.module \sweaver_ctools_object_list()
Helper function to return list for CTools.
4 calls to sweaver_ctools_object_list()
- sweaver_ctools_properties_list in ./
sweaver.module - CTools properties list callback for bulk export.
- sweaver_ctools_selectors_list in ./
sweaver.module - CTools selectors list callback for bulk export.
- sweaver_ctools_types_list in ./
sweaver.module - CTools types list callback for bulk export.
- sweaver_type_form in plugins/
sweaver_plugin_editor/ sweaver_plugin_editor.admin.inc - Type new/edit form.
File
- ./
sweaver.module, line 142 - Sweaver functions.
Code
function sweaver_ctools_object_list($object_type, $export_type = 2, $parent_check = FALSE) {
$list = array();
$objects = sweaver_object_load(NULL, $object_type, 'enabled');
foreach ($objects as $object) {
if ($object->export_type != $export_type) {
// Parent check.
if ($parent_check) {
if ($object->property_type == 'parent') {
continue;
}
elseif (!empty($object->property_parent)) {
$object->description = $objects[$object->property_parent]->description . ': ' . $object->description;
}
}
$list[$object->name] = $object->description;
}
}
return $list;
}