Skip to content

[6.3][RFC] Add save2copy id in save event and use state for task - #48329

Draft
HLeithner wants to merge 1 commit into
joomla:6.3-devfrom
HLeithner:6.3/feature/save2copy-id
Draft

[6.3][RFC] Add save2copy id in save event and use state for task#48329
HLeithner wants to merge 1 commit into
joomla:6.3-devfrom
HLeithner:6.3/feature/save2copy-id

Conversation

@HLeithner

Copy link
Copy Markdown
Member
  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

No AI used.

Summary of Changes

This is an concept PR, it tries to understand or explain a way to get rid of Application when using save method in the model. Additionally it extends the save event to provide the type of save and in case of a copy providing the old/source primary key.

We remove the call to Factory::getApplication() in the ContactModel with a call it's own state object which will already has the task set in the controller.

In addition we add the old primary key in the Contact Controller which removes the dependency to the super global input object in the model.

As bonus point we have the old Primary key and can provide this information to the save plugin trigger, this allows 3rd party plugins to know the source entry primary key.
For example if you have attached information to an contact based on on the contact.id you are now able to copy this information to the new contact too.

At this point it's a starting point for a discussion.

Testing Instructions

TBA

Actual result BEFORE applying this Pull Request

TBA

Expected result AFTER applying this Pull Request

TBA

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org: TBA

  • No documentation changes for manual.joomla.org needed

@joomla-cms-bot joomla-cms-bot added PR-6.3-dev RFC Request for Comment labels Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-6.3-dev RFC Request for Comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants