function _feedapi_format_settings in FeedAPI 6
Same name and namespace in other branches
- 5 feedapi.module \_feedapi_format_settings()
Returns per content type settings ordered by weight and only those that are turned on.
Parameters
$node_type_settings: Content type settings retrieved with feedapi_get_settings().
$stage_type: 'parsers' or 'processors'
2 calls to _feedapi_format_settings()
- feedapi_nodeapi in ./
feedapi.module - Implementation of hook_nodeapi().
- _feedapi_build_feed_object in ./
feedapi.module - Builds feed object ready to be sticked onto node.
File
- ./
feedapi.module, line 1363 - Handle the submodules (for feed and item processing) Provide a basic management of feeds
Code
function _feedapi_format_settings($node_type_settings, $stage_type) {
$result = array();
$settings = $node_type_settings[$stage_type];
if (!is_array($settings)) {
return $result;
}
foreach ($settings as $name => $properties) {
if (isset($properties['enabled'])) {
if ($properties['enabled'] == TRUE) {
$result[$properties['weight']] = $name;
}
}
}
ksort($result);
return $result;
}