ElementsCMS.php
The ElementsCMS class is a PHP-based content management system that provides functionality for managing CMS collections and items. It serves as the main entry point for interacting with content stored
Overview
Constructor
__construct(string $basePath, array $options = [])
__construct(string $basePath, array $options = [])$cms = new ElementsCMS('/path/to/content', ['debug' => true]);Static Methods
make(string $basePath, array $options = []): ElementsCMS
make(string $basePath, array $options = []): ElementsCMS$cms = ElementsCMS::make('/path/to/cms_data');Configuration Methods
basePath(): string
basePath(): stringoptions(): array
options(): arrayoption(string $key, $default = null): mixed
option(string $key, $default = null): mixedsetOption(string $key, $value): void
setOption(string $key, $value): voidContent Management Methods
collection(string $path, array $options = []): ElementsCMSCollection
collection(string $path, array $options = []): ElementsCMSCollectionitem(string $collectionPath, string $slug): ?ElementsCMSItem
item(string $collectionPath, string $slug): ?ElementsCMSItemUsage Examples
Basic Setup
Working with Collections
Loading Individual Items
Managing Configuration
Dependencies
File Structure
Last updated
Was this helpful?

