Skip to content

Añade función para eliminar botones en vistas#1883

Open
daniel89fg wants to merge 1 commit intoNeoRazorX:masterfrom
daniel89fg:remove-button-actions
Open

Añade función para eliminar botones en vistas#1883
daniel89fg wants to merge 1 commit intoNeoRazorX:masterfrom
daniel89fg:remove-button-actions

Conversation

@daniel89fg
Copy link
Copy Markdown
Contributor

Implementa el método removeButton en BaseController para permitir la eliminación de botones específicos en las vistas. Se añaden métodos para gestionar los hijos de los botones y se asegura que se genere un hash único para cada botón.

¿Cómo has probado los cambios?

Toda modificación debe haber sido mínimamente probada. Marca o describe las pruebas que has realizado:

  • He revisado mi código antes de enviarlo.
  • He probado que funciona correctamente en mi PC.
  • He probado que funciona correctamente con una base de datos vacía.
  • He ejecutado los tests unitarios.

Implementa el método removeButton en BaseController para permitir la eliminación de botones específicos en las vistas. Se añaden métodos para gestionar los hijos de los botones y se asegura que se genere un hash único para cada botón.
Copilot AI review requested due to automatic review settings February 4, 2026 12:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements functionality to remove buttons from views by adding a removeButton method to BaseController. The implementation adds a hash-based identification system for buttons to enable their removal.

Changes:

  • Added hash property to RowButton class for unique identification of buttons
  • Implemented hash generation in RowActions.addButton using md5 of button properties (excluding action)
  • Added removeButton method in BaseController to remove buttons by hash from view rows
  • Added getChildren and setChildren methods to RowActions for managing button collections

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
Core/Lib/Widget/RowButton.php Added hash property and data-hash attribute to all rendered button elements
Core/Lib/Widget/RowActions.php Added hash generation logic in addButton, plus getter/setter methods for children array
Core/Lib/ExtendedController/BaseController.php Implemented removeButton method to find and remove buttons by hash from actions and footer rows

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants