Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FilamentShield.php #473

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

mahdimirhendi
Copy link

Fix for Issue #471:

•	Added a check to ensure that the getHeading method returns a non-null value before using it.
•	Removed redundant check for TableWidget in the heading validation logic, as it’s already handled in the existing conditions.

This should address the issue with heading retrieval in widgets

Adding Extra Heading value check
Copy link

what-the-diff bot commented Dec 20, 2024

PR Summary

  • Improved Widget's Heading Verification Process
    The way we determine the heading of our widgets has been updated. Instead of the older and complex method, we now use a simple private method - hasValidHeading($widgetInstance) - which makes our code cleaner and easier to maintain.

  • Addition of a New Method
    A new method named hasValidHeading($widgetInstance) is introduced. This function checks whether the widget we're dealing with is indeed a Widget. It also validates that it has a method called getHeading and the heading itself is not empty. This will ensure that every widget used in our system complies with these rules, avoiding errors down the line.

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.

Translating Widget and Custom Permission Labels in filament shield
1 participant