Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Create a Basic Plugin

Started by Orlando 9 years ago · 2 replies · 941 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 DrPen, 1 month ago
2 477 1 month ago
Plugins · by renedebaaij, 2 months ago
1 349 1 month ago
Plugins · by Thomas, 1 month ago
1 374 1 month ago
Plugins · by complanar, 2 months ago
6 698 2 months ago
Plugins · by BenLaKnet, 2 months ago
1 641 2 months ago