You are here

function ds_plugins_process in Display Suite 6.3

Same name and namespace in other branches
  1. 6 ds.module \ds_plugins_process()
  2. 6.2 ds.module \ds_plugins_process()

Process plugins.

Parameters

stdClass $display : The display built by ds_render_content

stdClass $object: The original object being processed

array $vars: The variables used to build that display

2 calls to ds_plugins_process()
dsDisplay::render in includes/dsDisplay.php
Render content
ds_render_content in includes/ds.api.inc
Render content for an object.

File

./ds.module, line 670

Code

function ds_plugins_process(&$display, $object, $vars) {
  $plugins = variable_get($display->api_info['module'] . '_plugin_settings', array());
  if (!empty($plugins)) {
    foreach ($plugins as $key => $data) {
      if (isset($data['filename']) && isset($data['class'])) {
        require_once $data['filename'];
        $class = $data['class'];
        $plugin = new $class();
        $plugin
          ->execute($vars, $display, $display->display_settings, $object->type, $display->api_info['module']);
      }
    }
  }
}