drupal-state

Community

Persist runtime state across requests with Drupal State API.

Authoredutrul
Version1.0.0
Installs0

System Documentation

What problem does it solve?

State is for runtime operational data that should persist across requests but is not configuration. Use Config for user-managed settings. Use State for internal operational data (last cron run, migration status, etc.).

Core Features & Use Cases

  • Store and retrieve values using StateInterface get/set/delete, and batch operations getMultiple/setMultiple/deleteMultiple.
  • Enforce namespaced keys like my_module.last_run to avoid collisions.
  • Provide persistent runtime information such as cron times, migration offsets, and feature flags.

Quick Start

Inject StateInterface and start storing and retrieving runtime data using namespaced keys (e.g., my_module.last_run) with get, set, and delete methods.

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: drupal-state
Download link: https://github.com/edutrul/drupal-ai/archive/main.zip#drupal-state

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.