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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Create a Basic Plugin

Started by Orlando 9 years ago · 2 replies · 635 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 Rene, 1 week ago
2 46 1 week ago
Plugins · by Xavier, 4 weeks ago
2 55 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1181 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 49 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 73 2 months ago