Download the PHP package limegreentangerine/class_kit without Composer
On this page you can find all versions of the php package limegreentangerine/class_kit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download limegreentangerine/class_kit
More information about limegreentangerine/class_kit
Files in limegreentangerine/class_kit
Package class_kit
Short Description Collection of helper classes for LGT packages.
License MIT
Informations about the package class_kit
ClassKit
ClassKit is a curated helper library for Concrete CMS package development. It centralizes the repetitive work that shows up across Limegreentangerine projects: package setup, page listing patterns, translation-adaptor support, API access, environment checks, file imports, and lightweight entity/search utilities.
Overview
ClassKit is designed to be consumed by Concrete CMS packages instead of being a standalone application. The goal is to keep common package logic in one place while keeping the surface area small and easy to extend.
The library helps with:
- package lifecycle management and installation hooks
- common Concrete CMS package traits for attributes, blocks, themes, pages, and storage
- page and AJAX-page helpers for list rendering and pagination
- translation-adaptor support for AJAX-powered multilingual page flows
- environment-aware configuration checks
- cached search flows and reusable result helpers
- API request wrappers and response handling
- remote file import utilities and logging patterns
- simple Doctrine-style entity base classes
Requirements
- PHP 8.4+
- Concrete CMS 9.2+
- Composer 2.x
Installation
Install the package via Composer:
When working in a local package workspace, make sure Composer autoloading is enabled in the Concrete CMS environment where the consuming package is loaded.
Quick start
Use the base package controller as the foundation for your package:
This gives you a consistent package bootstrap with common install hooks, service registration, and reusable setup helpers.
Included helpers
ClassKit currently includes the following capabilities:
- Page and page-list extensions for attribute-topic filtering and search use cases
- Translation-adaptor support for AJAX-powered multilingual page flows
- Shared package controller and package interface abstractions
- Environment checks for local, staging, and production workflows
- Cached search helper for content and page lookups
- File import utilities for bringing remote images into the Concrete file manager
- API request base classes for JSON/XML integrations
- Logger abstraction and standard response wrappers
- Base entity classes for simple Doctrine-backed models
- AJAX page response helpers for paginated card-based content views
Package traits
The package includes reusable traits in src/Package/Traits for common Concrete CMS package setup tasks. These traits are intended for package controllers or installer classes that need consistent configuration and registration logic.
Available traits:
AttributeTrait- create attribute types, sets, keys, select options, and page-type composer controlsBlockTrait- install block types, register block type sets, and add page-type composer block controlsExpressTrait- create Express objects, generate simple forms, and manage default view/edit formsFileTrait- create file sets and reuse the remote image import helpersPageTrait- add pages, page types, and publish targetsStorageTrait- register remote or custom storage typesThemeTrait- install or fetch page themes by handle
Example:
These traits simplify package installation and configuration while preserving a predictable pattern that is easy to reason about across multiple codebases.
Package structure
Example usage
Environment checks
Page list filtering
Cached search results
API client base class
The API base class centralizes request URL construction, payload encoding, header management, and response handling for JSON or XML APIs.
File import helper
Base entity pattern
This gives a consistent foundation for package entity classes that need standard ID lookups and Doctrine-friendly structure.
Svelte component workflow
ClassKit includes a command for scaffolding Svelte custom elements in a Concrete
CMS project. Run it from the project root, where public/application and public/packages are available:
At the package-handle prompt, enter an existing package handle to create the
component under public/packages/<handle>, or leave it blank to use
public/application. Then enter a path relative to that directory. Paths must
start with blocks, elements, page_templates, single_pages, themes, or
views; non-block paths are placed in a view subdirectory.
For example, choosing the package handle store and path
single_pages/product_details creates a component under
public/packages/store/single_pages/product_details/view. The command
substitutes the component name and hyphenated handle in the Svelte, PHP, and
TypeScript templates, and adds the component path to svelte-components.json
in the project root. Edit the generated Svelte component and include its
TypeScript entry point in the project's frontend build.
Laravel Mix Updates for Svelte Component builds
Copy and paste this snippet into your webpack.mix.js in the project root:
Development
Run the package test suite using Composer:
Additional formatting and validation commands are available:
This runs the following formatting commands:
Check formatting without changes:
Notes
- This project is a shared helper package, not a standalone customer-facing application.
- It is intended to be consumed by Concrete CMS packages that need a common base layer across multiple projects.
- The package includes conventions and reusable abstractions for standard Concrete CMS package workflows.
License
ClassKit is released under the MIT License. See LICENSE.TXT for details.