function __construct() {
global $global_modified_att;
global $id_type;
global $id_obje;
$this->modified_att = $global_modified_att ?? [];
$this->type_id = $id_type ?? null;
$this->id_obje = $id_obje ?? null;
$this->module_code_modified_att = $this->setModuleCodeModifiedAtt();
}
đ§ __construct
function __construct() {
global $global_modified_att;
global $id_type;
global $id_obje;
$this->modified_att = $global_modified_att ?? [];
$this->type_id = $id_type ?? null;
$this->id_obje = $id_obje ?? null;
$this->module_code_modified_att = $this->setModuleCodeModifiedAtt();
}
đ§ __construct
function __construct() {
global $global_modified_att;
global $id_type;
global $id_obje;
$this->modified_att = $global_modified_att ?? [];
$this->type_id = $id_type ?? null;
$this->id_obje = $id_obje ?? null;
$this->module_code_modified_att = $this->setModuleCodeModifiedAtt();
}
đ§ __construct
function __construct() {
global $global_modified_att;
global $id_type;
global $id_obje;
$this->modified_att = $global_modified_att ?? [];
$this->type_id = $id_type ?? null;
$this->id_obje = $id_obje ?? null;
$this->module_code_modified_att = $this->setModuleCodeModifiedAtt();
}
đ§ __construct
function __construct() {
global $global_modified_att;
global $id_type;
global $id_obje;
$this->modified_att = $global_modified_att ?? [];
$this->type_id = $id_type ?? null;
$this->id_obje = $id_obje ?? null;
$this->module_code_modified_att = $this->setModuleCodeModifiedAtt();
}
đ§ __construct
Constructor for ModifiedAtt Initializes the class with global variables
function __construct() {
global $global_modified_att;
global $id_type;
global $id_obje;
$this->modified_att = $global_modified_att ?? [];
$this->type_id = $id_type ?? null;
$this->id_obje = $id_obje ?? null;
$this->module_code_modified_att = $this->setModuleCodeModifiedAtt();
}
đ§ setModuleCodeModifiedAtt
Get the modified attributes array
function setModuleCodeModifiedAtt() {
$module_code_modified_att = [];
// Check if modified_att is valid
if (!is_array($this->modified_att) || empty($this->modified_att)) {
return $module_code_modified_att;
}
// Check if type_id is valid
if (empty($this->type_id)) {
error_log("ModifiedAtt::getModuleCodeModifiedAttArray: type_id is empty");
return $module_code_modified_att;
}
try {
// ... (truncated)
âŠī¸ Returns
(array) The module code modified attributes
đ§ isModified
Checks if a specific module code has been modified
function isModified($value_att) {
// Check if module_code_modified_att is empty
if (empty($this->module_code_modified_att)) {
return false;
}
// Loop through each attribute in the array
foreach ($this->module_code_modified_att as $att_key => $att_data) {
// Check if the module_code matches the value_att parameter
if (isset($att_data['module_code']) && $att_data['module_code'] === $value_att) {
return true;
}
}
// No matching module code was found
return false;
// ... (truncated)
âī¸ Parameters
$value_att(string) The module code to check for modifications
âŠī¸ Returns
(boolean) True if the module code has been modified, false otherwise