Article_Entity_Content
Trait for handling entities with associated articles in a content management system
The Article_Entity_Content
trait provides functionality for managing entities that have associated articles. It defines a structure for displaying, filtering, and managing these entities.
Main Method
normals()
This method sets up the configuration for managing normal entities with associated articles.
Key actions:
- Sets up group name and table type
- Defines list and filter columns
- Prepares select data for flags and colors
- Defines input fields (columns) for the entity
Configuration Properties
Defines the group name for these entities.
Specifies the type of table. Options include:
- TABLE_ENTITY_WITH_ARTICLE
- TABLE_NOARTICLE_WITH_ALL_BUTTONS
- TABLE_NOARTICLE_JUST_CLONE
Columns and Filters
listColumns
An array defining the columns to be displayed in the list view. Includes:
- name
- entities_tags_relation
- [table]_tags_relation
- id
- date_added
filterColumns
An array defining the columns that can be used for filtering. Similar to listColumns but may include additional fields like ‘description’.
Input Fields
The method defines a set of input fields (columns) for the entity. Key fields include:
The unique identifier for the entity.
The date the entity was added, automatically set to the current date and time.
The internal name of the entity.
Manages the many-to-many relationship between entities and tags.
Manages the many-to-many relationship between the specific entity type and its tags.