All that any plugin truly requires is branding. These options come from three methods: getName(), getVersion(), getAuthors(). Code Block |
---|
language | php |
---|
title | /plugins/my_plugin/my_plugin_plugin.php |
---|
linenumbers | true |
---|
| <?php
class MyPluginPlugin extends Plugin {
...
public function getName() {
return "MyPlugin";
}
public function getVersion() {
return "1.0.0";
}
public function getAuthors() {
return array(
array(
'name' => "MyCompany",
'url' => "http://www.mycompanyplugindevelopment.com"
)
);
}
}
?> |
The getAuthors() method requires a multi-dimensional array, so you can specify multiple authors if needed. Lastly, each plugin needs a logo. By default these are loaded from /plugins/my_plugin/views/default/images/logo.png. You can override the location of the logo file by implementing the getLogo() method in your plugin. Code Block |
---|
language | php |
---|
title | /plugins/my_plugin/my_plugin_plugin.php |
---|
linenumbers | true |
---|
| <?php
class MyPluginPlugin extends Plugin {
|
public function getLogo() {
| return "views" . DS . "default" . DS . "images" . DS . "some_other_logo.png";
}
}
?> |
|