Company Tag Reference Public

Build Research & Evidence

The live module-source evidence this ID Studio guide was written from: the file map of controllers, models, libraries, views, jobs, migrations and config, and where each documented behaviour is implemented.

Guide version: r1 Module version: 1.4.0 Updated: 2026-07-22 Estimated time: 2 min
Reference

Build Research & Evidence

This guide is written from the module's own source. This page maps each documented behaviour to the file that implements it, so you can verify anything or dig deeper.

Controllers

FileResponsibility
controllers/CompanyTag.phpEvery authenticated screen & endpoint — dashboard, settings, allocation, template library/builder, generation, registry & lifecycle.
controllers/Idverify.phpPublic (guest) QR verification; sessionless tenant switch; minimal status only.

Libraries

FileResponsibility
libraries/Id_format.phpPure ID-format token engine — parse / validate (exactly one {SEQ}) / render / example / period key.
libraries/Id_template_schema.phpField catalogue + validate / sanitise / clamp / canonicalise / checksum a template definition (security-critical).
libraries/Id_card_renderer.phpRenders a definition + merge data into front/back PNGs and a CR80 PDF (GD/Intervention, QR & barcode).
libraries/CardMaker.phpThe classic fixed-layout card export (legacy).

Models

FileResponsibility
models/Idstudio_sequence_model.phpAtomic reserve() (row-locked) — non-overlapping ID ranges.
models/Idstudio_template_model.phpTemplate lifecycle — create / get-with-version / save-draft (forks on published) / publish / duplicate / archive.
models/Idstudio_template_version_model.phpImmutable version rows + next version number.
models/Idstudio_job_model.phpGeneration jobs + idempotency lookup.
models/Idstudio_tag_model.phpRegistry queries, unique serial, create tag, lifecycle (print/issue/revoke), effective status, timeline, expire, prune.
models/Idstudio_model.phpCross-cutting employee/job_idnum queries (counts, existence, column length).
models/Id_template_model.phpLegacy background-image templates.

Views, jobs, migrations & config

  • Viewsviews/company_tag/idstudio/: _nav, dashboard, settings, allocate, templates, builder (+ _builder_js / _builder_styles), generate, registry, tag_detail, revoke_modal, verify.
  • Cronjobs/ExpireIdstudioTagsJob.php (daily expire + artifact prune).
  • Migrationsmigrations/…_create_idstudio_tables.php (idempotent, reversible).
  • Configconfig/{module_config,permissions,menu,default_menu,routes,system_logs}.php.
  • Teststests/CompanyTagTest.php (run via php erpat module:test CompanyTag).

How the build was verified

Alongside the module test suite, the ID Studio backend was checked against a live database:

  • Atomic allocation hands out non-overlapping, monotonic ID ranges.
  • The template schema drops invalid elements, clamps coordinates and strips unsafe backgrounds; checksums are stable and order-independent.
  • The renderer produces valid 1011×638 PNGs (all element types) and a valid PDF.
  • Unique constraints on the job idempotency key and the tag serial hold; lifecycle transitions and bidirectional replace lineage behave as documented.
????
The single item not yet exercised is a full click-through in a live browser — the surfaces are code-complete and database-verified, but a hands-on smoke test of the whole build → publish → generate → issue/revoke → scan flow is the recommended final check.
Was this guide helpful?

Report a content problem