Added Document upload to ConstructionConsent Owners
This commit is contained in:
@@ -2,10 +2,24 @@
|
||||
|
||||
class ConstructionConsentOwner extends mfBaseModel {
|
||||
private $consent;
|
||||
private $files;
|
||||
private $result_file;
|
||||
|
||||
|
||||
public function getProperty($name) {
|
||||
if($this->$name == null) {
|
||||
|
||||
if($name == "files") {
|
||||
if(!$this->id) return null;
|
||||
$files = ConstructionConsentOwnerFile::search(["constructionconsentowner_id" => $this->id]);
|
||||
if(count($files)) {
|
||||
foreach($files as $file) {
|
||||
$this->files[$file->filename] = $file;
|
||||
}
|
||||
}
|
||||
return $this->files;
|
||||
}
|
||||
|
||||
if($name == "consent") {
|
||||
$consent = new ConstructionConsent($this->constructionconsent_id);
|
||||
if($consent->id) {
|
||||
|
||||
Reference in New Issue
Block a user