party_commerce.module in Party 8.2
Support for Drupal Commerce customer profiles.
File
modules/party_commerce/party_commerce.module
View source
<?php
function party_commerce_party_data_set_info() {
$sets = array();
foreach (commerce_customer_profile_type_get_name() as $type => $label) {
$sets["commerce_customer_profile_" . $type] = array(
'label' => $label,
'entity type' => 'commerce_customer_profile',
'entity bundle' => $type,
'class' => 'PartyCustomerProfileDataSet',
'admin' => array(
'manage fields' => 'admin/commerce/customer-profiles/types/' . $type . '/fields',
'manage display' => 'admin/commerce/customer-profiles/types/' . $type . '/display',
),
'piece' => array(
'path' => 'customer-profile-' . str_replace('_', '-', $type),
'title' => $label,
'maker' => 'view',
'page callback' => 'party_view_data_set',
'page arguments' => array(
1,
"commerce_customer_profile_" . $type,
),
'access arguments' => array(
"view any {$type} customer profile",
),
'file' => 'party.pages.inc',
),
);
}
return $sets;
}
class PartyCustomerProfileDataSet extends PartyDefaultDataSet {
}