ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilParagraphPlugin Class Reference

This class describes plugin. More...

+ Collaboration diagram for ilParagraphPlugin:

Public Member Functions

 ilParagraphPlugin ($directory, $title, $filetype, $link, $description="", $active=FALSE)
 create paragraph plugin instance
 serializeToString ()
 returns a string representation used to active a plugin in page.xsl
 setTitle ($title)
 set title of plugin used within alt tag of image replaces |,# sign with _
 setLink ($link)
 set link of plugin relativ to plugin url replaces |,# sign with _
 setImage ($image)
 set image link relative to plugin url replaces |,# sign with _
 setFileType ($filetype)
 set filetype of plugin to determine for which paragraph it will be activated replaces |,# sign with _
 getTitle ()
 getPluginDir ()
 getTemplateDir ()
 getTemplateURL ()
 getClassDir ()
 getResourceDir ()
 getResourceURL ()
 getPluginURL ()
 getSystemURL ()
 isActive ()
 setActive ($bool)
 sets active to value bool
 setDescription ($description)
 set plugin description
 getDescription ()
 returns description of plugin
 getDirectory ()
 returns plugin directory name

Data Fields

 $properties
 all plugin properties are stored in a associative array to be processed very easy Properties: filetype, title, link and image
 $directory
 $description
 $active
 switch, which activates the plugin, defaults to false

Detailed Description

This class describes plugin.

  • use the following plugin directory structure

– content – plugins – classes (contains helpful classes like this) – plugin1 (plugin with name "plugin1") – classes (classes needed for plugin) – ressources (bin ressources for plugin, jars etc...) – templates (ilias templates, etc.)

Definition at line 39 of file class.ilParagraphPlugin.php.

Member Function Documentation

ilParagraphPlugin::getClassDir ( )
Returns
absolute class directory

Definition at line 169 of file class.ilParagraphPlugin.php.

References getPluginDir().

{
return $this->getPluginDir()."/classes";
}

+ Here is the call graph for this function:

ilParagraphPlugin::getDescription ( )

returns description of plugin

Returns
description

Definition at line 233 of file class.ilParagraphPlugin.php.

References $description.

{
}
ilParagraphPlugin::getDirectory ( )

returns plugin directory name

Returns
string directory name of plugin

Definition at line 242 of file class.ilParagraphPlugin.php.

References $directory.

{
}
ilParagraphPlugin::getPluginDir ( )
Returns
absolute plugin directory

Definition at line 147 of file class.ilParagraphPlugin.php.

References $directory, and ILIAS_ABSOLUTE_PATH.

Referenced by getClassDir(), getResourceDir(), and getTemplateDir().

{
return ILIAS_ABSOLUTE_PATH."/Services/COPage/plugins/".$this->directory;
}

+ Here is the caller graph for this function:

ilParagraphPlugin::getPluginURL ( )
Returns
plugin url

Definition at line 192 of file class.ilParagraphPlugin.php.

References $directory, and getSystemURL().

Referenced by getTemplateURL(), and setLink().

{
return $this->getSystemURL()."/Services/COPage/plugins/".$this->directory;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilParagraphPlugin::getResourceDir ( )
Returns
absolute resource directory

Definition at line 177 of file class.ilParagraphPlugin.php.

References getPluginDir().

{
return $this->getPluginDir()."/resources";
}

+ Here is the call graph for this function:

ilParagraphPlugin::getResourceURL ( )
Returns
resource url

Definition at line 185 of file class.ilParagraphPlugin.php.

References getSystemURL().

{
return $this->getSystemURL()."/Services/COPage/plugins/".$this->directory."/resources";
}

+ Here is the call graph for this function:

ilParagraphPlugin::getSystemURL ( )
Returns
System base URL

Definition at line 200 of file class.ilParagraphPlugin.php.

Referenced by getPluginURL(), and getResourceURL().

{
return str_replace("/Services/COPage/plugins","",ILIAS_HTTP_PATH);
}

+ Here is the caller graph for this function:

ilParagraphPlugin::getTemplateDir ( )
Returns
absolute template directory

Definition at line 154 of file class.ilParagraphPlugin.php.

References getPluginDir().

{
return $this->getPluginDir()."/templates";
}

+ Here is the call graph for this function:

ilParagraphPlugin::getTemplateURL ( )
Returns
template url

Definition at line 163 of file class.ilParagraphPlugin.php.

References getPluginURL().

Referenced by setImage().

{
return $this->getPluginURL()."/templates";
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilParagraphPlugin::getTitle ( )
Returns
title

Definition at line 140 of file class.ilParagraphPlugin.php.

{
return $this->properties["title"];
}
ilParagraphPlugin::ilParagraphPlugin (   $directory,
  $title,
  $filetype,
  $link,
  $description = "",
  $active = FALSE 
)

create paragraph plugin instance

Parameters
string$directoryrelative sub directory name, e.g. edit
string$titletitle of plugin
string$filetypefiletype to which the plugin will be applied
string$linklink which to start when clicking on plugin
string$descriptionplugin description
boolean$activeactivate plugin or not
Returns
ilParagraphPlugin

Definition at line 76 of file class.ilParagraphPlugin.php.

References $active, $description, $directory, $title, setActive(), setDescription(), setFileType(), setLink(), and setTitle().

{
$this->directory = $directory;
$this->properties = array ("filetype" => "", "title" => "", "link" => "");
$this->setTitle($title);
$this->setFileType($filetype);
$this->setLink ($link);
$this->setActive($active);
}

+ Here is the call graph for this function:

ilParagraphPlugin::isActive ( )
Returns
true if plugin is active

Definition at line 207 of file class.ilParagraphPlugin.php.

References $active.

{
return $this->active;
}
ilParagraphPlugin::serializeToString ( )

returns a string representation used to active a plugin in page.xsl

all properties separatad by #

Returns
returns serialized string

Definition at line 95 of file class.ilParagraphPlugin.php.

{
return implode("#",$this->properties);
}
ilParagraphPlugin::setActive (   $bool)

sets active to value bool

Parameters
booleansets active

Definition at line 215 of file class.ilParagraphPlugin.php.

Referenced by ilParagraphPlugin().

{
$this->active = ($bool)?true:false;
}

+ Here is the caller graph for this function:

ilParagraphPlugin::setDescription (   $description)

set plugin description

Parameters
string$description

Definition at line 224 of file class.ilParagraphPlugin.php.

References $description.

Referenced by ilParagraphPlugin().

{
$this->description = $description;
}

+ Here is the caller graph for this function:

ilParagraphPlugin::setFileType (   $filetype)

set filetype of plugin to determine for which paragraph it will be activated replaces |,# sign with _

Definition at line 131 of file class.ilParagraphPlugin.php.

Referenced by ilParagraphPlugin().

{
$filetype = str_replace (array("|","#"), array ("_","_"),$filetype);
$this->properties["filetype"] = $filetype;
}

+ Here is the caller graph for this function:

ilParagraphPlugin::setImage (   $image)

set image link relative to plugin url replaces |,# sign with _

Definition at line 122 of file class.ilParagraphPlugin.php.

References getTemplateURL().

{
$image = str_replace (array("|","#"), array ("_","_"),$image);
$this->properties["image"] = $this->getTemplateURL()."/".$image;
}

+ Here is the call graph for this function:

ilParagraphPlugin::setLink (   $link)

set link of plugin relativ to plugin url replaces |,# sign with _

Definition at line 113 of file class.ilParagraphPlugin.php.

References getPluginURL().

Referenced by ilParagraphPlugin().

{
$link = str_replace (array("|","#"), array ("_","_"),$link);
$this->properties["link"] = $this->getPluginURL()."/".$link;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilParagraphPlugin::setTitle (   $title)

set title of plugin used within alt tag of image replaces |,# sign with _

Definition at line 104 of file class.ilParagraphPlugin.php.

References $title.

Referenced by ilParagraphPlugin().

{
$title = str_replace (array("|","#"), array ("_","_"),$title);
$this->properties["title"] = $title;
}

+ Here is the caller graph for this function:

Field Documentation

ilParagraphPlugin::$active

switch, which activates the plugin, defaults to false

Definition at line 62 of file class.ilParagraphPlugin.php.

Referenced by ilParagraphPlugin(), and isActive().

ilParagraphPlugin::$description

Definition at line 57 of file class.ilParagraphPlugin.php.

Referenced by getDescription(), ilParagraphPlugin(), and setDescription().

ilParagraphPlugin::$directory
ilParagraphPlugin::$properties

all plugin properties are stored in a associative array to be processed very easy Properties: filetype, title, link and image

Definition at line 45 of file class.ilParagraphPlugin.php.


The documentation for this class was generated from the following file: