Log in
Model

DefaultBackend

Magento\Catalog\Model\Attribute\Backend\DefaultBackend

What it does

This class serves as the default backend model for catalog attributes in Magento 2, extending the base EAV attribute backend.

Developers would use this when creating or customizing catalog attributes that allow HTML content, as it automatically validates WYSIWYG HTML input to ensure restricted elements are not used.

It hooks into the attribute save and validation process to sanitize user-provided HTML content for security.

Public Methods

  • beforeSave()
  • validate()