bd-presenter

Community

Fluent builder for the better-data Presenter.

AuthorLonsdale201
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Extend the better-data Presenter by enabling a fluent builder with methods such as rename, mask, format, compute, or by adding a PresentationContext flag. The Presenter is a mutable builder around a readonly DTO, and the wrapped DataObject NEVER mutates. CollectionPresenter records every configurer as a closure on the configurers and replays them per item in toArray. The contract requires that any new method emitting values from the DTO honors sensitiveFieldNames; a bypass would be a security regression. Localized strings require LocaleScope::runIn so withLocale works. Use when adding mask, formatDate-like, hideIf, or context-aware methods. Triggers on changes to Presenter, CollectionPresenter, PresentationContext, or Formatter.

Core Features & Use Cases

  • Fluent methods on Presenter and CollectionPresenter (rename, mask, format, compute).
  • PresentationContext flags to tailor rendering per context (REST, admin, export) and locale-aware rendering.
  • Formatter namespace for reusable transformations under Formatter/ (e.g., DateFormatter, CurrencyFormatter).

Quick Start

Create a new fluent Presenter method following existing patterns and mirror it on CollectionPresenter to apply it to collections.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: bd-presenter
Download link: https://github.com/Lonsdale201/wp-agent-skills/archive/main.zip#bd-presenter

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.