PHPackages                             jalendport/craft-base - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. jalendport/craft-base

ActiveLibrary

jalendport/craft-base
=====================

Shared foundation for jalendport Craft CMS plugins

1.1.1(1mo ago)0685↓49.3%3mitPHPPHP ^8.2CI passing

Since Jul 16Pushed 1mo agoCompare

[ Source](https://github.com/jalendport/craft-base)[ Packagist](https://packagist.org/packages/jalendport/craft-base)[ GitHub Sponsors](https://github.com/jalendport)[ RSS](/packages/jalendport-craft-base/feed)WikiDiscussions develop Synced 1w ago

READMEChangelog (4)Dependencies (5)Versions (6)Used By (3)

[![Base](src/icon.svg)](src/icon.svg)

Base
====

[](#base)

*The shared foundation under every [jalendport](https://github.com/jalendport) Craft CMS plugin.*

Features
--------

[](#features)

- **Base Plugin class** — extend `jalendport\base\Plugin` instead of `craft\base\Plugin` and get everything below for free.
- **Per-plugin logging** — each plugin writes its own `storage/logs/-*.log`, with `MyPlugin::info()` / `::warning()` / `::error()` static helpers.
- **Controller traits** — `runAndReturn()` for web controllers (success/failure responses done right) and `runAndExit()` + output helpers for console controllers.
- **Settings helpers** — a `configWarning()` Twig macro that flags settings overridden in `config/.php`, plus `getConfigOverrides()` for disabling the fields a config file has taken control of.
- **Testing helpers** — settings factories and an in-memory cache for unit-only Pest suites.

Usage
-----

[](#usage)

```
use jalendport\base\Plugin;

class Altcha extends Plugin
{
    public static Altcha $plugin;

    public function init(): void
    {
        parent::init(); // registers the log target, @altcha alias, shared template root
        self::$plugin = $this;

        $this->registerEventHandlers();
    }
}
```

Flag and disable the settings a config file has overridden:

```
protected function settingsHtml(): ?string
{
    return Craft::$app->getView()->renderTemplate('altcha/settings', [
        'settings' => $this->getSettings(),
        'overrides' => $this->getConfigOverrides(),
    ]);
}
```

```
{% import 'jalendport-base/_macros' as base %}

{{ forms.lightswitchField({
    label: 'Enabled'|t('altcha'),
    name: 'enabled',
    on: settings.enabled,
    disabled: 'enabled' in overrides,
    warning: base.configWarning('enabled', 'altcha'),
}) }}
```

Support
-------

[](#support)

Found a bug or have a question? [Open an issue](https://github.com/jalendport/craft-base/issues).

---

Made by [Jalen Davenport](https://jalendport.com)

Icon: base by Lars Meiertoberens from [Noun Project](https://thenounproject.com/browse/icons/term/base/) (CC BY 3.0)

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance90

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

45d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6537823?v=4)[Jalen Davenport](/maintainers/jalendport)[@jalendport](https://github.com/jalendport)

---

Top Contributors

[![jalendport](https://avatars.githubusercontent.com/u/6537823?v=4)](https://github.com/jalendport "jalendport (20 commits)")

---

Tags

craftcmscraftcms-plugin

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/jalendport-craft-base/health.svg)

```
[![Health](https://phpackages.com/badges/jalendport-craft-base/health.svg)](https://phpackages.com/packages/jalendport-craft-base)
```

###  Alternatives

[spicyweb/craft-neo

A Matrix-like field type with block hierarchy

393822.0k12](/packages/spicyweb-craft-neo)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293967.9k41](/packages/craftcms-feed-me)[verbb/formie

The most user-friendly forms plugin for Craft.

102406.3k79](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54691.6k28](/packages/solspace-craft-freeform)[verbb/vizy

A flexible visual editor field for Craft.

4252.4k1](/packages/verbb-vizy)[verbb/events

A full-featured plugin for event management and ticketing.

2412.3k](/packages/verbb-events)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
