Contractjournal finished & Started Contractconfig Hooks for Provisioning Workflow
This commit is contained in:
@@ -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();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user