You are here

public function radioactivity_incident_storage::__construct in Radioactivity 7

Constructor

Parameters

unknown_type $field_id:

2 calls to radioactivity_incident_storage::__construct()
radioactivity_deferred_incident_storage::__construct in storage/radioactivity_deferred_incident_storage.php
Constructor
radioactivity_live_incident_storage::__construct in storage/radioactivity_live_incident_storage.php
Constructor
2 methods override radioactivity_incident_storage::__construct()
radioactivity_deferred_incident_storage::__construct in storage/radioactivity_deferred_incident_storage.php
Constructor
radioactivity_live_incident_storage::__construct in storage/radioactivity_live_incident_storage.php
Constructor

File

storage/radioactivity_incident_storage.php, line 15

Class

radioactivity_incident_storage

Code

public function __construct($field_id) {
  $field_info = field_info_field_by_id($field_id);
  $this->field_id = $field_id;
  $this->half_life = $field_info['settings']['half_life'];
  $this->cut_off = $field_info['settings']['cut_off'];
  $this->incident_energy = $field_info['settings']['incident_energy'];
  $this->field_name = $field_info['field_name'];
  $this->table_name = "field_data_" . $this->field_name;
  $this->energy_column_name = $this->field_name . '_' . RADIOACTIVITY_FIELD_ENERGY;
  $this->timestamp_column_name = $this->field_name . '_' . RADIOACTIVITY_FIELD_TIMESTAMP;
}