Files
thetool/application/Contractconfig/hooks/Contractconfig_Hook.php

35 lines
738 B
PHP

<?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();
}