Setyenv · Docs
  • English
  • Spanish
  • Chinese
  • Japanese
  • Arabic
  • German
  • French
  • Hindi
  • Indonesian
  • Italian
  • Dutch
  • Portuguese
  • Russian
  • Turkish

Demo seed script

bin/demo_frontend.php is a one-shot script that creates two demo entities, three demo records and two demo pages so an operator can SEE the front-end consumption working in a browser before any customer-specific rollout.

Run it

docker exec -i wp-pfworkflow-wordpress-1 php \
  /var/www/html/wp-content/plugins/wp-pfmanagement/bin/demo_frontend.php seed

Output ends with two URLs — one for the public form, one for the public directory. Open them in an incognito window.

What it creates

  • Entity pfm_demo_contact with public in can_create_roles — anonymous visitors can submit, but can_read_roles is data_reader so the list of submissions stays private.
  • Entity pfm_demo_directory with public in can_read_roles — visible to everyone. Three rows are seeded.
  • Page "Demo: Public contact form" containing [pfm_form entity="pfm_demo_contact" …].
  • Page "Demo: Public directory" containing [pfm_list entity="pfm_demo_directory" columns="title,city,summary"].

Tear it down

docker exec -i wp-pfworkflow-wordpress-1 php \
  /var/www/html/wp-content/plugins/wp-pfmanagement/bin/demo_frontend.php teardown

Drops both entities (and their pfm_rec_* tables via the Reconciler) and deletes the two demo pages by meta-key marker. Other site content is never touched.

The script itself is meant to be deleted once the team is done looking at the result. It exists for demo / verification, not as production code. The teardown removes the demo action as well so the directory entity is left as a plain-CRUD entity afterwards.