public function FeedsNodeProcessor::configForm in Feeds 8.2
Override parent::configForm().
Overrides FeedsProcessor::configForm
File
- lib/
Drupal/ feeds/ Plugin/ feeds/ processor/ FeedsNodeProcessor.php, line 188 - Contains \Drupal\feeds\Plugin\feeds\fetcher\FeedsNodeProcessor.
Class
- FeedsNodeProcessor
- Defines a node processor.
Namespace
Drupal\feeds\Plugin\feeds\processorCode
public function configForm(&$form_state) {
$form = parent::configForm($form_state);
$author = user_load($this->config['author']);
$form['author'] = array(
'#type' => 'textfield',
'#title' => t('Author'),
'#description' => t('Select the author of the nodes to be created - leave empty to assign "anonymous".'),
'#autocomplete_path' => 'user/autocomplete',
'#default_value' => empty($author->name) ? 'anonymous' : check_plain($author->name),
);
$form['authorize'] = array(
'#type' => 'checkbox',
'#title' => t('Authorize'),
'#description' => t('Check that the author has permission to create the node.'),
'#default_value' => $this->config['authorize'],
);
$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 nodes'),
'#options' => $period,
'#description' => t('Select after how much time nodes should be deleted. The node\'s published date will be used for determining the node\'s age, see Mapping settings.'),
'#default_value' => $this->config['expire'],
);
return $form;
}