You are here

class PaymentMethodFeaturesController in Payment 7

Features controller for payment_method entities.

Hierarchy

Expanded class hierarchy of PaymentMethodFeaturesController

1 string reference to 'PaymentMethodFeaturesController'
payment_entity_info in ./payment.module
Implements hook_entity_info().

File

./payment.classes.inc, line 736
The API and related functions for executing and managing payments.

View source
class PaymentMethodFeaturesController extends EntityDefaultFeaturesController {

  /**
   * {@inheritdoc}
   */
  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;
  }

}

Members