You are here

function sheetnode_feed_plugin_style::inherit_options in Sheetnode 7.2

Same name and namespace in other branches
  1. 6 views/sheetnode_plugin_style.inc \sheetnode_feed_plugin_style::inherit_options()
  2. 7 views/sheetnode_plugin_style.inc \sheetnode_feed_plugin_style::inherit_options()

Set to inherit options from sheetnode plugin style.

2 calls to sheetnode_feed_plugin_style::inherit_options()
sheetnode_phpexcel_plugin_style::render in modules/sheetnode_phpexcel/sheetnode_phpexcel_plugin_style.inc
Render sheetnode plugin style.
sheetnode_raw_plugin_style::render in views/sheetnode_raw_plugin_style.inc
Render plugin style.

File

views/sheetnode_plugin_style.inc, line 632

Class

sheetnode_feed_plugin_style
Extension for sheetnode feed plugin style.

Code

function inherit_options() {
  if ($this->options['inherit']) {
    $displays = array_filter($this->display->handler
      ->get_option('displays'));
    if (!empty($displays)) {
      foreach ($displays as $display) {
        $handler = $this->view->display[$display]->handler;
        if ($handler
          ->get_option('style_plugin') == 'sheet') {
          $options = $handler
            ->get_option('style_options');
          break;
        }
      }
    }
    if (isset($options)) {
      foreach ($options as $key => $option) {
        $this->options[$key] = $option;
      }
    }
  }
}