PHPackages                             rahpt/ci4-module-theme - 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. [Templating &amp; Views](/categories/templating)
4. /
5. rahpt/ci4-module-theme

ActiveLibrary[Templating &amp; Views](/categories/templating)

rahpt/ci4-module-theme
======================

Theme and layout management system for CodeIgniter 4 modules

v1.1.0(6mo ago)022MITPHPPHP ^8.1

Since Feb 15Pushed 6mo agoCompare

[ Source](https://github.com/rahpt/ci4-module-theme)[ Packagist](https://packagist.org/packages/rahpt/ci4-module-theme)[ Docs](https://github.com/rahpt/ci4-module-theme)[ RSS](/packages/rahpt-ci4-module-theme/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

CodeIgniter 4 Module Theme Manager
==================================

[](#codeigniter-4-module-theme-manager)

[![Version](https://camo.githubusercontent.com/82607e69abe99314712caaca3e9c3d804b6290df91f9771848c2c84b1d6bf4b8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e312e302d626c75652e737667)](https://github.com/rahpt/ci4-module-theme)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)
[![PHP](https://camo.githubusercontent.com/f8208839db97a381b7f2d688a40d2682f5457cc38eb7765830ef48721b872168/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e312d627269676874677265656e2e737667)](https://php.net)

Sistema de gerenciamento de temas para módulos CodeIgniter 4. Permite que cada módulo use um tema diferente e fornece helpers para renderização de views.

---

📋 Características
-----------------

[](#-características)

- ✅ **Multi-Theme** - Cada módulo pode ter seu próprio tema
- ✅ **Layout Dinâmico** - Troca automática de layout por módulo
- ✅ **Theme Hooks** - Sistema de eventos para extensibilidade
- ✅ **Helper Functions** - Funções convenientes para views
- ✅ **Default Themes** - AdminLTE, Bootstrap e custom

---

🚀 Instalação
------------

[](#-instalação)

```
composer require rahpt/ci4-module-theme
```

---

📖 Uso Básico
------------

[](#-uso-básico)

### Definir Tema no Módulo

[](#definir-tema-no-módulo)

```
// app/Modules/Dashboard/Config/Module.php
class Module extends BaseModule
{
    public string $name = 'Dashboard';
    public string $theme = 'adminlte';  // Define o tema
}
```

### Obter Layout do Módulo

[](#obter-layout-do-módulo)

```
// No Controller
use Rahpt\Ci4ModuleTheme\ThemeManager;

public function index()
{
    return view('Dashboard\index', [
        'layout' => ThemeManager::getModuleLayout('Dashboard')
    ]);
}
```

### Na View

[](#na-view)

```

    Dashboard

            ©  Meu App. Todos os direitos reservados.

```

---

🔧 Configuração Avançada
-----------------------

[](#-configuração-avançada)

### Tema Diferente por Ambiente

[](#tema-diferente-por-ambiente)

```
class Module extends BaseModule
{
    public string $theme;

    public function __construct()
    {
        parent::__construct();

        // Desenvolvimento: tema simples
        // Produção: tema completo
        $this->theme = ENVIRONMENT === 'production'
            ? 'adminlte'
            : 'bootstrap';
    }
}
```

### Tema Baseado em Permissões

[](#tema-baseado-em-permissões)

```
class Module extends BaseModule
{
    public string $theme;

    public function __construct()
    {
        parent::__construct();

        // Admin: tema completo
        // User: tema simplificado
        $this->theme = auth()->user()->isAdmin()
            ? 'adminlte-full'
            : 'adminlte-simple';
    }
}
```

---

🧪 Testes
--------

[](#-testes)

```
composer test
```

---

📄 Licença
---------

[](#-licença)

MIT License

---

👏 Créditos
----------

[](#-créditos)

Desenvolvido por **Rahpt**

---

🕒 Histórico de Versões
----------------------

[](#-histórico-de-versões)

### \[1.1.0\] - 2026-02-16

[](#110---2026-02-16)

- **Padronização**: Alinhamento com o ecossistema Rahpt v1.1.0.
- **Arquitetura**: Implementação de `Registrar` para descoberta automática de views de tema.
- **Suporte**: Melhoria na lógica de `HookRegistry` para extensibilidade.

### \[1.0.1\] - 2026-02-15

[](#101---2026-02-15)

- Estabilização inicial dos layouts base.

---

**Versão**: 1.1.1
**Última Atualização**: 2026-02-16

###  Health Score

34

—

LowBetter than 74% of packages

Maintenance69

Regular maintenance activity

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

3

Last Release

184d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/50341387?v=4)[José Proença](/maintainers/RahPT)[@rahpt](https://github.com/rahpt)

---

Top Contributors

[![rahpt](https://avatars.githubusercontent.com/u/50341387?v=4)](https://github.com/rahpt "rahpt (3 commits)")

---

Tags

codeignitertemplatemodulesthemelayoutcodeigniter4rahpt

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rahpt-ci4-module-theme/health.svg)

```
[![Health](https://phpackages.com/badges/rahpt-ci4-module-theme/health.svg)](https://phpackages.com/packages/rahpt-ci4-module-theme)
```

###  Alternatives

[almasaeed2010/adminlte

AdminLTE - admin control panel and dashboard that's based on Bootstrap 4

45.5k9.1M147](/packages/almasaeed2010-adminlte)[abydahana/aksara

Aksara is a modern, developer-friendly framework and CMS built on CodeIgniter 4, featuring rapid CRUD development, modular architecture, smart routing, flexible access control, API integration, and an AI assistant to make content management faster and smarter.

1141.2k](/packages/abydahana-aksara)[maniaba/asset-connect

AssetConnect is a file management library for CodeIgniter 4 that allows you to associate files with any entity in your application

1016.0k](/packages/maniaba-asset-connect)

PHPackages © 2026

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