Commit 137e72af authored by Nigel McNie's avatar Nigel McNie
Browse files

Changed the method signature of get_icon again.

It now takes a hash of options rather than just an artefact ID. This allows you to get icons of different sizes, and more importantly, show icons only in the context of certain views.
parent 675a4325
......@@ -235,7 +235,7 @@ class ArtefactTypeBlog extends ArtefactType {
}
public static function get_icon($id=0) {
public static function get_icon($options=null) {
}
public static function is_singular() {
......@@ -461,7 +461,7 @@ class ArtefactTypeBlogPost extends ArtefactType {
}
public static function get_icon($id=0) {
public static function get_icon($options=null) {
}
public static function is_singular() {
......
......@@ -426,12 +426,19 @@ abstract class ArtefactType {
/**
* returns path to icon
* @param int $id The ID of the artefact to render
* Returns a URL for an icon for the appropriate artefact
*
* @param array $options Options for the artefact. The array MUST have the
* 'id' key, representing the ID of the artefact for
* which the icon is being generated. Other keys
* include 'size' for a [width]x[height] version of
* the icon, as opposed to the default 20x20, and
* 'view' for the id of the view in which the icon is
* being displayed.
* @abstract
* @return string path to icon (relative to docroot)
* @return string URL for the icon
*/
public static abstract function get_icon($id=0);
public static abstract function get_icon($options=null);
// ******************** STATIC FUNCTIONS ******************** //
......
......@@ -83,7 +83,7 @@ class PluginArtefactResume extends Plugin {
class ArtefactTypeResume extends ArtefactType {
public static function get_icon($id=0) {}
public static function get_icon($options=null) {}
public function __construct($id=0, $data=array()) {
if (empty($id)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment