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

No need to get $LayoutObject in the layout mixin classes #3049

Closed
bschmalhofer opened this issue Feb 25, 2024 · 1 comment
Closed

No need to get $LayoutObject in the layout mixin classes #3049

bschmalhofer opened this issue Feb 25, 2024 · 1 comment
Labels
tidying Tidying of the code
Milestone

Comments

@bschmalhofer
Copy link
Contributor

The Perl modules in _ Kernel/Output/HTML/Layout_ seem to be mixed into the LayoutObject. So there is no obvious reason why
a reference to that singleton needs to be fetched from the object manager.

grep -r HTML::Layout Kernel/Output/HTML/Layout/*.pm | grep Get
Kernel/Output/HTML/Layout/LinkObject.pm: my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout');
Kernel/Output/HTML/Layout/Ticket.pm: my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout');
Kernel/Output/HTML/Layout/Translations.pm: my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout');
Kernel/Output/HTML/Layout/Translations.pm: my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout');
Kernel/Output/HTML/Layout/Translations.pm: my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout');
Kernel/Output/HTML/Layout/Znuny4OTOBORepo.pm: my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout');

@bschmalhofer bschmalhofer added the tidying Tidying of the code label Feb 25, 2024
@bschmalhofer bschmalhofer added this to the OTOBO 11.0 milestone Feb 25, 2024
bschmalhofer added a commit that referenced this issue Feb 25, 2024
to the mixin classes in Kernel::Output::HTML::Layout.
Stating that they are loaded automatically.
bschmalhofer added a commit that referenced this issue Feb 25, 2024
just to emphasize that this newly created layout object
is on the same footing as $LayoutObject2
bschmalhofer added a commit that referenced this issue Feb 25, 2024
bschmalhofer added a commit that referenced this issue Feb 25, 2024
to the mixin classes in Kernel::Output::HTML::Layout.
Stating that they are loaded automatically.
bschmalhofer added a commit that referenced this issue Feb 25, 2024
just to emphasize that this newly created layout object
is on the same footing as $LayoutObject2
bschmalhofer added a commit that referenced this issue Feb 25, 2024
@bschmalhofer
Copy link
Contributor Author

Cleanup is done, the test suite looks fine. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tidying Tidying of the code
Projects
None yet
Development

No branches or pull requests

1 participant