Log in
Model

PageRepository

Magento\Cms\Model\PageRepository

What it does

PageRepository is the main service class for managing CMS pages in Magento 2.

Developers use this class to perform CRUD operations (create, read, update, delete) on CMS pages programmatically, retrieve pages by ID, or get filtered lists of pages using search criteria.

It's the recommended way to interact with CMS pages instead of directly using models or resource models.

Public Methods

  • save()
  • getById()
  • getList()
  • delete()
  • deleteById()