protected function RssFields::defineOptions in Views RSS 8.3
Same name in this branch
- 8.3 src/Plugin/views/style/RssFields.php \Drupal\views_rss\Plugin\views\style\RssFields::defineOptions()
- 8.3 src/Plugin/views/row/RssFields.php \Drupal\views_rss\Plugin\views\row\RssFields::defineOptions()
Same name and namespace in other branches
- 8.2 src/Plugin/views/row/RssFields.php \Drupal\views_rss\Plugin\views\row\RssFields::defineOptions()
Information about options for all kinds of purposes will be held here.
'option_name' => array(
- 'default' => default value,
- 'contains' => (optional) array of items this contains, with its own
defaults, etc. If contains is set, the default will be ignored and
assumed to be array().
),
Return value
array Returns the options of this handler/plugin.
Overrides RowPluginBase::defineOptions
File
- src/
Plugin/ views/ row/ RssFields.php, line 35 - Definition of Drupal\views\Plugin\views\row\RssFields.
Class
- RssFields
- Renders an RSS item based on fields.
Namespace
Drupal\views_rss\Plugin\views\rowCode
protected function defineOptions() {
$options = parent::defineOptions();
$item_elements = views_rss_get('item_elements');
if (count($item_elements)) {
foreach ($item_elements as $module => $module_item_elements) {
foreach (array_keys($module_item_elements) as $element) {
list($namespace, $element_name) = views_rss_extract_element_names($element, 'core');
$options['item'][$namespace][$module][$element_name] = array(
'default' => NULL,
);
}
}
}
return $options;
}