This class describes plugin. More...
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 |
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 19 of file class.ilParagraphPlugin.php.
ilParagraphPlugin::getClassDir | ( | ) |
Definition at line 149 of file class.ilParagraphPlugin.php.
References getPluginDir().
{ return $this->getPluginDir()."/classes"; }
ilParagraphPlugin::getDescription | ( | ) |
returns description of plugin
Definition at line 213 of file class.ilParagraphPlugin.php.
{
return $this->description;
}
ilParagraphPlugin::getDirectory | ( | ) |
returns plugin directory name
Definition at line 222 of file class.ilParagraphPlugin.php.
{
return $this->directory;
}
ilParagraphPlugin::getPluginDir | ( | ) |
Definition at line 127 of file class.ilParagraphPlugin.php.
Referenced by getClassDir(), getResourceDir(), and getTemplateDir().
{ return ILIAS_ABSOLUTE_PATH."/content/plugins/".$this->directory; }
ilParagraphPlugin::getPluginURL | ( | ) |
Definition at line 172 of file class.ilParagraphPlugin.php.
References getSystemURL().
Referenced by getTemplateURL(), and setLink().
{ return $this->getSystemURL()."/content/plugins/".$this->directory; }
ilParagraphPlugin::getResourceDir | ( | ) |
Definition at line 157 of file class.ilParagraphPlugin.php.
References getPluginDir().
{ return $this->getPluginDir()."/resources"; }
ilParagraphPlugin::getResourceURL | ( | ) |
Definition at line 165 of file class.ilParagraphPlugin.php.
References getSystemURL().
{ return $this->getSystemURL()."/content/plugins/".$this->directory."/resources"; }
ilParagraphPlugin::getSystemURL | ( | ) |
Definition at line 180 of file class.ilParagraphPlugin.php.
Referenced by getPluginURL(), and getResourceURL().
{ return str_replace("/content/plugins","",ILIAS_HTTP_PATH); }
ilParagraphPlugin::getTemplateDir | ( | ) |
Definition at line 134 of file class.ilParagraphPlugin.php.
References getPluginDir().
{ return $this->getPluginDir()."/templates"; }
ilParagraphPlugin::getTemplateURL | ( | ) |
Definition at line 143 of file class.ilParagraphPlugin.php.
References getPluginURL().
Referenced by setImage().
{ return $this->getPluginURL()."/templates"; }
ilParagraphPlugin::getTitle | ( | ) |
Definition at line 120 of file class.ilParagraphPlugin.php.
{ return $this->properties["title"]; }
ilParagraphPlugin::ilParagraphPlugin | ( | $ | directory, | |
$ | title, | |||
$ | filetype, | |||
$ | link, | |||
$ | description = "" , |
|||
$ | active = FALSE | |||
) |
create paragraph plugin instance
string | $directory relative sub directory name, e.g. edit | |
string | $title title of plugin | |
string | $filetype filetype to which the plugin will be applied | |
string | $link link which to start when clicking on plugin | |
string | $description plugin description | |
boolean | $active activate plugin or not |
Definition at line 56 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); $this->setDescription($description); }
ilParagraphPlugin::isActive | ( | ) |
Definition at line 187 of file class.ilParagraphPlugin.php.
{
return $this->active;
}
ilParagraphPlugin::serializeToString | ( | ) |
returns a string representation used to active a plugin in page.xsl
all properties separatad by #
Definition at line 75 of file class.ilParagraphPlugin.php.
{ return implode("#",$this->properties); }
ilParagraphPlugin::setActive | ( | $ | bool | ) |
sets active to value bool
boolean | sets active |
Definition at line 195 of file class.ilParagraphPlugin.php.
Referenced by ilParagraphPlugin().
{ $this->active = ($bool)?true:false; }
ilParagraphPlugin::setDescription | ( | $ | description | ) |
set plugin description
string | $description |
Definition at line 204 of file class.ilParagraphPlugin.php.
References $description.
Referenced by ilParagraphPlugin().
{ $this->description = $description; }
ilParagraphPlugin::setFileType | ( | $ | filetype | ) |
set filetype of plugin to determine for which paragraph it will be activated replaces |,# sign with _
Definition at line 111 of file class.ilParagraphPlugin.php.
Referenced by ilParagraphPlugin().
{ $filetype = str_replace (array("|","#"), array ("_","_"),$filetype); $this->properties["filetype"] = $filetype; }
ilParagraphPlugin::setImage | ( | $ | image | ) |
set image link relative to plugin url replaces |,# sign with _
Definition at line 102 of file class.ilParagraphPlugin.php.
References getTemplateURL().
{ $image = str_replace (array("|","#"), array ("_","_"),$image); $this->properties["image"] = $this->getTemplateURL()."/".$image; }
ilParagraphPlugin::setLink | ( | $ | link | ) |
set link of plugin relativ to plugin url replaces |,# sign with _
Definition at line 93 of file class.ilParagraphPlugin.php.
References getPluginURL().
Referenced by ilParagraphPlugin().
{ $link = str_replace (array("|","#"), array ("_","_"),$link); $this->properties["link"] = $this->getPluginURL()."/".$link; }
ilParagraphPlugin::setTitle | ( | $ | title | ) |
set title of plugin used within alt tag of image replaces |,# sign with _
Definition at line 84 of file class.ilParagraphPlugin.php.
References $title.
Referenced by ilParagraphPlugin().
{ $title = str_replace (array("|","#"), array ("_","_"),$title); $this->properties["title"] = $title; }
ilParagraphPlugin::$active |
switch, which activates the plugin, defaults to false
Definition at line 42 of file class.ilParagraphPlugin.php.
Referenced by ilParagraphPlugin().
ilParagraphPlugin::$description |
Definition at line 37 of file class.ilParagraphPlugin.php.
Referenced by ilParagraphPlugin(), and setDescription().
ilParagraphPlugin::$directory |
Definition at line 30 of file class.ilParagraphPlugin.php.
Referenced by ilParagraphPlugin().
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 25 of file class.ilParagraphPlugin.php.