You are here

function slickgrid_editors::__construct in Slickgrid 7

Same name and namespace in other branches
  1. 7.2 plugins/editors/handler.class.php \slickgrid_editors::__construct()

File

plugins/editors/handler.class.php, line 34

Class

slickgrid_editors
Base class for export UI.

Code

function __construct($plugin) {
  $this->plugin = $plugin;

  // Entity variables
  $this->entity_type = $_POST['entity_type'];

  // Load all the entities
  $this->entities = entity_load($this->entity_type, $_POST['entity_ids']);

  // Field variables
  $this->field_name = $_POST['field_name'];

  // Views variables
  $this->field_id = $_POST['field_id'];
  $this->view = $_POST['view'];
  $this->display_id = $_POST['display_id'];

  // Register the error handler if one exists
  if (function_exists($this->plugin['error'])) {
    $this->error_callback = $this->plugin['error'];
  }
}