Skip to content
This repository has been archived by the owner on Jan 9, 2021. It is now read-only.

Resource Models

Cosmo Mathieu edited this page Oct 9, 2018 · 4 revisions

This documenting merely a concept in PageStudio CMS. This feature has not been implemented.

Executing all CRUD (create, read, update, delete) requests. The resource model contains the SQL code for completing these requests.

Performing additional business logic. For example, a resource model could perform data validation, start processes before or after data is saved, or perform other database operations.

Resource Model Collections

If you are expecting to return more than one record from a database then you should use a resource model collection.

Use Cases

<?php 

class ArticleModel extends ResourceModel
{
    
}

class BlogCollectionModel extends ResourceModelCollection
{
    
}

class BlogModel extends EavModel
{
    
}