Example #1
0
 public function __construct(\Hax4\Foundation\Model $parent_model, int $identifier_id = null, array $inital_data = null)
 {
     $this->model = $parent_model;
     // if not identifier info, then we consider this as new record
     if (is_null($identifier_id)) {
         $this->user_input_data = $inital_data;
     } else {
         $this->identifier = (object) ["column" => $parent_model->getIdentifierColumn(), "value" => $identifier_id];
     }
 }