Theme Scanner parseContent() method visibility
mplodowski opened this issue · 1 comments
mplodowski commented
I want to add pdf layouts for theme scanner. I use event for this like so:
Event::listen('rainlab.translate.themeScanner.afterScan', function (ThemeScanner $scanner) {
$messages = [];
foreach (PdfLayout::all() as $layout) {
$messages = array_merge($messages, $scanner->parseContent($layout->content_html)); // this line is problematic
}
Message::importMessages($messages);
});
The issue with this code is that parseContent()
method on ThemeScanner
class is protected
and I cannot use it in my code. Of course I can add this method to my class, but I also then need to add processStandardTags()
method as well. This make my code ugly.
I suggest to change visibility of this method to public
, so developers can use it.
I can make PR if this is ok with you.
daftspunk commented
Sure, that sounds fine.