NerdsAndCompany\Schematic\Services\Plugins::getPlugin PHP Method

getPlugin() protected method

Returns plugin by handle.
protected getPlugin ( string $handle ) : Craft\BasePlugin | null
$handle string
return Craft\BasePlugin | null
    protected function getPlugin($handle)
    {
        $plugin = $this->getPluginService()->getPlugin($handle, false);
        if (!$plugin) {
            $this->addError(Craft::t("Plugin {handle} could not be found, make sure it's files are located in the plugins folder", ['handle' => $handle]));
        }
        return $plugin;
    }