It sounds like you're attempting to access the
getDeveloper method on your plugin's main service class, but the class doesn't exist.
You have two options:
- Create the service class, and implement a
- Call the
getDeveloper method on your main plugin class (which I suspect is what you're really trying to do).
Option One: Service
Your minimal service class will look like this:
class CrmPortalService extends BaseApplicationComponent
* Returns the developer name.
* You could either hard-code the developer name, or you could
* retrieve it from the main plugin class, as described in
* option two.
* @return string
public function getDeveloper()
return 'John Doe';
Option Two: Plugin
Craft uses Services to expose functionality, in exactly the same way that plugins do. If you're trying to figure out how to do something, just look for a Craft Service with a similar name.
In this case, you want to retrieve your main plugin file, so the
PluginsService is a good place to start. We're in luck, it has a
getPlugin method, which accepts a plugin handle, and returns the plugin class.
Here's how you might use that, to call the
getDeveloper method in your main plugin class.