function PaymentMethodFeaturesController::export in Payment 7
Generates the result for hook_features_export().
Overrides EntityDefaultFeaturesController::export
File
- ./
payment.classes.inc, line 741 - The API and related functions for executing and managing payments.
Class
- PaymentMethodFeaturesController
- Features controller for payment_method entities.
Code
function export($data, &$export, $module_name = '') {
$pipe = parent::export($data, $export, $module_name);
// Add dependencies for the payment method controller classes.
$controller_class_names = array();
foreach (entity_load_multiple_by_name($this->type, $data) as $method) {
$controller_class_names[] = $method->controller->name;
}
$result = db_select('registry')
->fields('registry', array(
'module',
))
->condition('name', $controller_class_names)
->condition('type', 'class')
->execute();
while ($module = $result
->fetchField()) {
$export['dependencies'][$module] = $module;
}
return $pipe;
}