simplenews.info.inc in Simplenews 7.2
File
includes/simplenews.info.inc
View source
<?php
class SimplenewsNewsletterMetadataController extends EntityDefaultMetadataController {
function entityPropertyInfo() {
$info = parent::entityPropertyInfo();
$properties =& $info[$this->type]['properties'];
$properties['format']['options list'] = 'simplenews_format_options';
$properties['priority']['options list'] = 'simplenews_get_priority';
$properties['new_account']['options list'] = 'simplenews_new_account_options';
$properties['opt_inout']['options list'] = 'simplenew_opt_inout_options';
$properties['receipt']['type'] = 'boolean';
$properties['block']['type'] = 'boolean';
$properties['from_name']['label'] = t('From name');
$properties['from_address']['label'] = t('From address');
$properties['new_account']['labe'] = t('New account');
$properties['email_subject']['label'] = t('E-mail subject');
$properties['opt_inout']['label'] = t('Opt-in/out method');
return $info;
}
}
class SimplenewsSubscriberMetadataController extends EntityDefaultMetadataController {
function entityPropertyInfo() {
$info = parent::entityPropertyInfo();
$properties =& $info[$this->type]['properties'];
$properties['activated']['type'] = 'boolean';
$properties['mail']['label'] = t('E-mail');
$properties['uid']['type'] = 'user';
$properties['uid']['label'] = t('User');
$properties['language']['type'] = 'language';
$properties['created']['type'] = 'date';
$properties['simplenews_subscriptions'] = array(
'label' => t('Simplenews Subscriptions'),
'description' => t('The simplenews newsletters the party is subscribed to.'),
'type' => 'list<simplenews_newsletter>',
'getter callback' => 'simplenews_property_simplenews_subscriptions_getter_callback',
);
return $info;
}
}