dmnkhhn
Active member
Lawrence, you are doing great work with your 'Creating an Addon' walkthrough.
I thought it would be good idea to have a place where users can ask questions about your code.
Please let me start with my first question:
In LimitSig -> ControllerPublic -> LimitSig.php you are creating a new function that has the same name as the original function.
The original function then gets overwritten by that new function but that means that we need to duplicate the original function first and copy it to LimitSig.php so that we don't loose the logic that is needed by the account. Without copying the existing code the function would not be complete.
What happens if we have two different add-ons that both replace the actionSignatur function?
Take this as an example:
Original:
Addon 1:
Addon 2:
I thought it would be good idea to have a place where users can ask questions about your code.
Please let me start with my first question:
In LimitSig -> ControllerPublic -> LimitSig.php you are creating a new function that has the same name as the original function.
The original function then gets overwritten by that new function but that means that we need to duplicate the original function first and copy it to LimitSig.php so that we don't loose the logic that is needed by the account. Without copying the existing code the function would not be complete.
What happens if we have two different add-ons that both replace the actionSignatur function?
Take this as an example:
Original:
PHP:
public function actionSignature() {
$test = $this->getSomeStrangeVariable();
return $test;
}
Addon 1:
PHP:
public function actionSignature() {
$test = $this->getSomeStrangeVariable();
return strtoupper($test);
}
Addon 2:
PHP:
public function actionSignature() {
$test = $this->getSomeStrangeVariable();
return md5($test);
}