setProperties(array( 'type' => $type, 'author' => (!$author->isNull() && !$author->staff) ? $author : null, 'authorStaff' => (!$author->isNull() && $author->staff) ? $author : null, 'to' => $to, )); $log->store(); } }