Пример #1
0
 public function updateEntity($id, $data)
 {
     // need to have special handling depending upon role of user
     // how inefficient is it to spin up a new user object here? Calling service will already have done just that?
     // contributor role users can't pending state (for review by admin)
     $user = new User($this->userid, $this->tenantid);
     if ($user->hasRole('contributor', $this->tenantid)) {
         $data->{"status"} = 'Pending';
     }
     return parent::updateEntity($id, $data);
 }