Actions
Registration
| Action | Arguments | Fires |
|---|---|---|
vxframework/register | Code_Registry $registry | Once per request on init (priority 0), to define objects in PHP. |
vxframework/abilities/register | string $registry_class | When VX registers its abilities, to add your own. |
vxframework/dictionary/register | none | When system dictionaries load, to add providers. |
Config as code
| Action | Arguments | Fires |
|---|---|---|
vxframework/config/file_written | string $type, string $key, array $config, string $file | After VX writes an object to a project JSON file. |
vxframework/config/file_deleted | string $type, string $key, array $config, string $file | After a project file is deleted (detach). |
vxframework/config/db_copy_discarded | string $type, string $key, array $config, string $reason | After a database copy is discarded in favor of the code definition. |
Revisions
| Action | Arguments | Fires |
|---|---|---|
vxframework/config_revisions/before_persist | string $entity_type, string $key, array $old, array $new | Before a fieldset save is recorded. |
vxframework/config_revisions/recorded | int $revision_id, string $entity_type, string $key | After a revision is stored. |
vxframework/config_revisions/before_restore | string $entity_type, string $key, int $revision_id, array $snapshot | Before a fieldset revision is restored. |
vxframework/config_revisions/after_restore | string $entity_type, string $key, int $revision_id | After a fieldset revision is restored. |
Content and data
| Action | Arguments | Fires |
|---|---|---|
vxframework/fieldsets/media/post_upload | int $attachment_id, array $field, $fieldset, int $entity_id, int $user_id | After a file is uploaded through a media field. |
vxframework/fieldsets/files/post_upload | same | After a file is uploaded through a Files field. |
vxframework/field_migrations/meta_key_changed | string $meta_type, string $old_key, string $new_key, int[] $object_ids | After Meta Watch moves values to a new key. |
vxframework/option_page/before_delete | int $page_id, string $key | Before an option page and its values are deleted. |
vxframework/dictionary/before_delete | string $key | Before a dictionary is deleted. |
For example, to purge a page cache when a file upload lands:
php
add_action( 'vxframework/fieldsets/media/post_upload', function ( int $attachment_id, array $field, $fieldset, int $entity_id ) {
my_cache_purge_post( $entity_id );
}, 10, 4 );Technical details for LLMs
$typevalues:post_type,taxonomy,fieldset.$configis the portable (export-normalized) config.$typeis alsooption_pageanddictionary.vxframework/config_revisions/*actions fire from the fieldset model; other entity types record revisions without these before/after hooks.vxframework/field_migrations/meta_key_changed$meta_type:post,termoruser.