Image_Content
Trait for handling image repository and teaser image functionality in a PHP application
The Image_Content
trait provides methods for managing an image repository, handling teaser images, and processing image-related operations in a content management system.
Main Methods
repository_overview()
Loads and displays the repository overview.
teaser_selector(entityId = false, $has_article = true)
Handles the selection of teaser images for entities.
The type of entity.
The ID of the entity.
Whether the entity has an associated article.
repo_module(item_id = false, $module_id = false)
Manages images for specific modules.
The type of module, defaulting to ‘image’.
The ID of the item associated with the module.
The ID of the module.
loadRepoViewWithData($data = array())
Loads the repository view with filtered data.
repoFilter(number = null, $lastElem = null)
Filters repository data based on various criteria.
deletePreviousModuleImages()
Deletes previously associated module images.
updateModuleImages()
Updates images associated with a module.
get_repo_image()
Retrieves a specific repository image.
image_categories()
Manages image categories.
crop_image()
Handles image cropping operations.
Utility Methods
get_repo_data($data = array())
Retrieves repository data including categories and images.
Key Features
- Teaser image selection for entities
- Module-specific image management
- Image filtering based on various criteria (date, category, tags, etc.)
- Image cropping functionality
- Category management for images