Contractjournal finished & Started Contractconfig Hooks for Provisioning Workflow

This commit is contained in:
Frank Schubert
2023-02-24 15:50:28 +01:00
parent aa373b5f4e
commit 3210981994
21 changed files with 562 additions and 279 deletions
@@ -0,0 +1,35 @@
<?php
abstract class Contractconfig_Hook {
protected $contract;
protected $items;
public function __construct(Contract $contract) {
if(method_exists($this, "init")) {
$this->init();
}
}
public function isResponsible() {
if(!$this->contract) return false;
// only work on contracts with our producttech attributes
if(!$this->testMyProductAttributes($contract)) {
return false;
}
}
private function testMyProductAttributes(Contract $contract) {
$product = $contract->product;
}
abstract public function beforeSave();
abstract public function afterSave();
abstract public function beforeDelete();
abstract public function afterDelete();
}