Skip to content
Grav 2.0 is officially stable. Read the announcement →
Plugins

Create a Basic Plugin

Started by Orlando 9 years ago · 2 replies · 741 views
9 years ago

hey there,
i'm trying to create a basic plugin.
but now in the basics of creation i get a fatal error.

Uncaught RuntimeException: Plugin 'istool' class not found!

/user/plugins/istool/
./blueprints.yaml
./istool.php
./istool.yaml

istool.php:

PHP
<?php
namespace Grav\Plugin;
use Grav\Common\Plugin;

class istool extends Plugin
{
public function onPluginsInitialized()
{
}
public static function getSubscribedEvents()
{
return [
‘onPluginsInitialized’ => ['onPluginsInitialized', 0],
];
}
}
?>

blueprints.yaml and istool.yaml some basics from the documentation.

why do i get a fatal error?

greetings,
orlando

last edited 12/05/17 by Orlando
9 years ago

d'oh!
found it.

class istool extends Plugin

must be

class istoolPlugin extends Plugin

9 years ago

Easier way:

  1. Install devtools plugin: bin/gpm install devtools
  2. Create new plugin: bin/plugin devtools new-plugin
  3. Fill in the details when prompted
👍 1

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Vladimir Novak, 2 weeks ago
3 291 2 weeks ago
Plugins · by Mathieu Lecouturier, 3 weeks ago
3 277 3 weeks ago
Plugins · by Slebeig, 2 months ago
1 403 2 months ago
Plugins · by Rene, 2 months ago
2 574 2 months ago
Plugins · by Xavier, 3 months ago
2 490 3 months ago