Skip to content

feat: _custom.php Support fuer Page-Controller im Player#256

Open
Avatarsia wants to merge 1 commit intoOpenXE-org:masterfrom
Avatarsia:fix/player-custom-module-support
Open

feat: _custom.php Support fuer Page-Controller im Player#256
Avatarsia wants to merge 1 commit intoOpenXE-org:masterfrom
Avatarsia:fix/player-custom-module-support

Conversation

@Avatarsia
Copy link
Copy Markdown
Contributor

Summary

  • Erweitert den Player (`phpwf/class.player.php`) um den bestehenden `_custom.php`-Erweiterungsmechanismus
  • Page-Controller koennen jetzt update-sicher ueber `www/pages/_custom.php` erweitert werden
  • Konsistent mit dem bestehenden Pattern in `loadModule()` (`class.application_core.php`)

Fixes #255

Aenderung

Eine Datei, +12/-2 Zeilen in `phpwf/class.player.php`:

  1. Nach dem Laden der Basis-Datei wird geprueft ob `_custom.php` existiert
  2. Bei der Instanziierung wird die Custom-Klasse (`Custom`) bevorzugt

Test plan

  • Ohne `_custom.php`: Verhalten unveraendert, alle Module laden normal
  • Mit `www/pages/ticket_custom.php` (`class TicketCustom extends Ticket`): Custom-Klasse wird geladen
  • Methoden-Override in Custom-Klasse funktioniert (z.B. `ticket_edit()`)
  • `parent::ticket_edit()` ruft Original-Methode korrekt auf

🤖 Generated with Claude Code

Der Player (class.player.php) laedt Page-Controller jetzt analog zu
loadModule() mit _custom.php Support. Wenn eine Datei
www/pages/<modul>_custom.php existiert, wird die Custom-Klasse
(<Modul>Custom extends <Modul>) bevorzugt instanziiert.

Das ermoeglicht es, Page-Controller zu erweitern ohne die Original-
Datei zu aendern — identisch zum bestehenden Pattern fuer
class.erpapi_custom.php, class.remote_custom.php etc.

Beispiel:
  www/pages/ticket.php        -> class Ticket
  www/pages/ticket_custom.php -> class TicketCustom extends Ticket

TicketCustom wird automatisch geladen und instanziiert.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Avatarsia pushed a commit to Avatarsia/OpenXE that referenced this pull request Apr 9, 2026
All four are single-file Avatarsia-authored bug fixes that are
also open upstream PRs on openxe-org:

- fix/250-wiedervorlage-sidebar-counter (PR OpenXE-org#253)
  www/eproosystem.php +2/-2: reactivate Wiedervorlagen counter

- fix/dateien-stichwoerter-245 (PR OpenXE-org#246)
  classes/Modules/Api/Controller/Version1/FileController.php +2/-2:
  fix variable scoping in POST /v1/dateien stichwoerter

- fix/versandpakete-247 (PR OpenXE-org#248)
  classes/Modules/Api/Controller/Version1/TrackingNumberController.php +25:
  write tracking numbers into the versandpakete table so the UI
  shows them

- fix/player-custom-module-support (PR OpenXE-org#256)
  phpwf/class.player.php +12/-2: support _custom.php extension
  files for page controllers, analogous to class.erpapi_custom.php

Each branch is based on an older origin/master snapshot, but
since origin/master is strictly behind upstream/master (zero
divergent commits), git merges only the new commits during
integration without re-applying the upstream drift.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: _custom.php Support fuer Page-Controller im Player

1 participant