public function fixedAttributes(array $attributes)
{
$attributes['pureContent'] = $this->getPureContent($attributes['content']);
if (empty($attributes['userType']) === true) {
$attributes['userType'] = $this::USER_TYPE_USER;
}
if (empty($attributes['approved']) === true) {
$attributes['approved'] = $this::APPROVED_APPROVED;
}
if (empty($attributes['published']) === true) {
$attributes['published'] = $this::PUBLISHED_PUBLISHED;
}
if (empty($attributes['status']) === true) {
$attributes['status'] = $this::STATUS_PUBLIC;
}
if (empty($attributes['display']) === true) {
$attributes['display'] = $this::DISPLAY_VISIBLE;
}
if ($attributes['published'] == 'published' && empty($attributes['publishedAt']) === true) {
$attributes['publishedAt'] = $this->freshTimestamp();
}
if (empty($attributes['reply']) === true) {
$attributes['reply'] = '';
}
if (empty($attributes['locale']) === true) {
$attributes['locale'] = '';
}
return $attributes;
}