Advanced Concepts
This page continues the high level description of general Concrete concepts but focuses on more advanced and less-commonly used concepts.
Tasks
In managing a Concrete website, sometimes lengthy maintenance actions are needed, such as clearing cache or regenerating sitemap.xml.
Tasks represent these actions. They can be initiated from the Dashboard or command line, scheduled, logged, and even batched in queues.
Configuration
Concrete uses various storage locations for configuration data through Config loaders and savers. Most values are stored in the filesystem with FileLoader and FileSaver, but database options are available. ConfigRepository manages these values using the Config facade class.
Assets
Assets in Concrete refer to JavaScript or CSS files. These can be grouped as Asset Groups. Instead of using file paths, you can use group names for better flexibility. Assets have version control to prevent conflicts and can be minified or combined for efficiency.
Events
Developers can tap into Concrete's Events. These events activate at specific moments, allowing custom code execution. Developers can also initiate their own events.
Views & Controllers
Concrete follows the Model-View-Controller approach. Items come with their own Controllers and Views, like blocks, attributes, single pages, and more.
Service Providers & Core Classes
Service providers are PHP classes not tied to Concrete's specific objects. Registered at startup, they're accessible via Concrete's app()
function and can be adjusted by custom code. Examples include \Concrete\Core\Mail\Service
, initiated with app('helper/mail')
.
Routing
Concrete adopts Symfony 5's Routing Component to set various user interface routes. Custom code can register these routes, accessible via a browser, which can trigger a PHP closure or a specific Controller method.
Database & Database Manager
The DatabaseManager class manages multiple database Connection objects. Configurations enable automatic connections. The global Database facade gives access to the current connection with \Database::connection()
.
Facades
Facades are static classes linked to actual implementations. These can be adjusted as needed. Concrete examples are Image
, Config
, Database
, and others.