XenForo
Administrative
- Thread starter
- Admin
- #1
Let's say as part of an addon, I've a custom entity created. In the structure class, I've declared either a
In certain scenarios, there would be a need to not run these functions (use case shown below).
PHP:
Now, I've a part of code that is updating value of a row and in this particular case, I do not want the
PHP:
Read more
ادامه مطلب...
__preSave()
or a __postSave()
or both.In certain scenarios, there would be a need to not run these functions (use case shown below).
PHP:
Code:
protected function __preSave()
{
$this->updated_by = \XF::visitor()->user_id;
}
Now, I've a part of code that is updating value of a row and in this particular case, I do not want the
__preSave()
to run.PHP:
$foo =...
Read more
ادامه مطلب...