-
-
Notifications
You must be signed in to change notification settings - Fork 834
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
PHP Extender: Rendering #1602
Comments
Since any work done on the HtmlDocument is related to a frontend, I'm thinking we can just add a new method to the (new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js')
->css(__DIR__.'/less/admin.less')
->document(function (HtmlDocument $document) {
$document->payload['statistics'] = 'blah';
}) Sound good? |
Yep, sounds good. I made this work, PR incoming... Just note that for flarum/statistics, due to the size of the listener, I allowed registering callbacks by name (needs to pass the name of an invokable class, which is then built by the container): (new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js')
->css(__DIR__.'/less/admin.less')
->document(Listener\AddStatisticsData::class) |
franzliedke
added a commit
that referenced
this issue
Oct 20, 2018
3 tasks
franzliedke
added a commit
that referenced
this issue
Oct 20, 2018
franzliedke
added a commit
that referenced
this issue
Oct 21, 2018
franzliedke
added a commit
that referenced
this issue
Oct 21, 2018
franzliedke
added a commit
to flarum/statistics
that referenced
this issue
Oct 21, 2018
askvortsov1
pushed a commit
to flarum/statistics
that referenced
this issue
Mar 11, 2022
askvortsov1
pushed a commit
to flarum/statistics
that referenced
this issue
May 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need another extender that allows setting variables when rendering a HTML frontend (e.g. the forum). This will replace code like this in the statistics extension:
Follow-up to #851.
The text was updated successfully, but these errors were encountered: