public function RelationFeedsProcessor::configForm in Relation 7
File
- relation_feeds/
RelationFeedsProcessor.inc, line 202 - Class definition of RelationFeedsProcessor.
Class
- RelationFeedsProcessor
- Creates relations from feed items.
Code
public function configForm(&$form_state) {
$form = parent::configForm($form_state);
$form['unique_enpoints'] = array(
'#type' => 'checkbox',
'#title' => t('Unique endpoints'),
'#description' => t('Use mapped endpoints as unique identifier for imported relations.'),
'#default_value' => $this->config['unique_enpoints'],
);
$author = user_load($this->config['author']);
$form['author'] = array(
'#type' => 'textfield',
'#title' => t('Author'),
'#description' => t('Select the author of the relations to be created - leave empty to assign "anonymous".'),
'#autocomplete_path' => 'user/autocomplete',
'#default_value' => empty($author->name) ? 'anonymous' : check_plain($author->name),
);
$period = drupal_map_assoc(array(
FEEDS_EXPIRE_NEVER,
3600,
10800,
21600,
43200,
86400,
259200,
604800,
2592000,
2592000 * 3,
2592000 * 6,
31536000,
), 'feeds_format_expire');
$form['expire'] = array(
'#type' => 'select',
'#title' => t('Expire relations'),
'#options' => $period,
'#description' => t('Select after how much time relations should be deleted. The relation\'s creation date will be used for determining the relation\'s age, see Mapping settings.'),
'#default_value' => $this->config['expire'],
);
return $form;
}