[RSS Feed/News] Is it possible to know the caller inside entity's _preSave() function?

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
There are two ways that I'm allowing an update of a custom entity.

1. A logged in user with appropriate permission manually updating it via a form submit
2. Via a enqueueLater() job

Now I've a _preSave() defined on the entity's class. But I'm wondering if inside this function I know how how the entity was updated.

PHP:

Code:
protected function _preSave()
{
    if($this->isUpdate())
    {
        // figure out if a user submitted a form
        // or the job has triggered the update...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom