add_label = $label; } public function getAddLabel():string { return $this->add_label; } protected function checkFieldVariables(string $variables):bool { if (!str_contains($variables, '{{')) { return false; } $fields = array_filter(array_map(function($field) { return str_replace('}}','',$field);}, explode('{{',$variables))); foreach ($fields as $field) { if (!array_key_exists($field, $this->fields)) { error_log('['.(new \ReflectionClass($this))->getShortName().']Invalid field attempted: '.$field); return false; } } return true; } public function setRowLabel(string $label):void { if (str_contains($label, '{{')) { if (!$this->checkFieldVariables($label)) { return; } } $this->row_label = $label; } public function getRowLabel():string { return $this->row_label; } }