You are here

function ds_plugins_process in Display Suite 6.2

Same name and namespace in other branches
  1. 6.3 ds.module \ds_plugins_process()
  2. 6 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

1 call to ds_plugins_process()
ds_render_content in ./ds.module
Render content for an object.

File

./ds.module, line 1230
Core functions for the Display Suite module.

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']);
      }
    }
  }
}