/** * Initialize this plugin with the plugin, profile, and entity specific * variables. * * @param object $profile * The Linkit profile to use. * @param array $plugin * The plugin array. */ function __construct($plugin, $profile) { parent::__construct($plugin, $profile); // Load the corresponding entity. $this->entity_info = entity_get_info($this->plugin['entity_type']); // Set bundle key name. if (isset($this->entity_info['entity keys']['bundle']) && !isset($this->entity_key_bundle)) { $this->entity_key_bundle = $this->entity_info['entity keys']['bundle']; } // Set the label field name. if (!isset($this->entity_field_label)) { $this->entity_field_label = $this->entity_info['entity keys']['label']; } // Make a shortcut for the profile data settings for this plugin. $this->conf = isset($this->profile->data[$this->plugin['name']]) ? $this->profile->data[$this->plugin['name']] : array(); }
/** * Initialize this plugin. */ function __construct($plugin, $profile) { parent::__construct($plugin, $profile); $this->table_name = 'linkit_tmp_view_table_' . rand(0, 1000) . rand(0, 1000); }