Hi there!
I made a simple plugin to add some user information!
I want to make new blueprints on item.html.twig
This is plugin config file:
enabled: false
authors:
-
name: Author 1
desc: Description 1
custom_file:
user/themes/quark/images/download.jpg:
name: download.jpg
type: image/jpeg
size: 7134
path: user/themes/quark/images/download.jpg
-
name: Author 2
desc: Description 2
custom_file:
user/themes/quark/images/student-2.png:
name: student-2.png
type: image/png
size: 172675
path: user/themes/quark/images/student-2.png
This is a blueprints:
header.author:
type: select
label: Author
classes: fancy
data-options@: '\Grav\Plugin\AuthorsPlugin::getAuthors'
And I have this in plugin php file:
public static function getAuthors() {
$author_name = $this->grav['config']->get('plugins.authors.name');
}
I get Error:
Using $this when not in object context
Any solutions for this? Thanks!