Model
Block
Magento\Cms\Model\Block
What it does
This class represents a CMS Block model in Magento 2, used to manage static content blocks that can be inserted throughout the store.
Developers use this to create, read, update, or delete CMS blocks programmatically, validate block content (including HTML validation and preventing self-referencing blocks), and manage block status, identifiers, and store assignments.
Public Methods
- beforeSave()
- getIdentities()
- getId()
- getIdentifier()
- getTitle()
- getContent()
- getCreationTime()
- getUpdateTime()
- isActive()
- setId()
- setIdentifier()
- setTitle()
- setContent()
- setCreationTime()
- setUpdateTime()
- setIsActive()
- getStores()
- getAvailableStatuses()