Public Member Functions | Data Fields

ilParagraphPlugin Class Reference

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

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 19 of file class.ilParagraphPlugin.php.


Member Function Documentation

ilParagraphPlugin::getClassDir (  ) 
Returns:
absolute class directory

Definition at line 149 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 213 of file class.ilParagraphPlugin.php.

                                   {
            return $this->description;
        }

ilParagraphPlugin::getDirectory (  ) 

returns plugin directory name

Returns:
string directory name of plugin

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

                                 {
            return $this->directory;
        }

ilParagraphPlugin::getPluginDir (  ) 
Returns:
absolute plugin directory

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

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

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

Here is the caller graph for this function:

ilParagraphPlugin::getPluginURL (  ) 
Returns:
plugin url

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

References getSystemURL().

Referenced by getTemplateURL(), and setLink().

                                 {
                return $this->getSystemURL()."/content/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 157 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 165 of file class.ilParagraphPlugin.php.

References getSystemURL().

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

Here is the call graph for this function:

ilParagraphPlugin::getSystemURL (  ) 
Returns:
System base URL

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

Referenced by getPluginURL(), and getResourceURL().

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

Here is the caller graph for this function:

ilParagraphPlugin::getTemplateDir (  ) 
Returns:
absolute template directory

Definition at line 134 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 143 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 120 of file class.ilParagraphPlugin.php.

                             {
                return $this->properties["title"];
        }

ilParagraphPlugin::ilParagraphPlugin ( directory,
title,
filetype,
link,
description = "",
active = FALSE 
)

create paragraph plugin instance

Parameters:
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
Returns:
ilParagraphPlugin

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);
        }

Here is the call graph for this function:

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

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 #

Returns:
returns serialized string

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

                                     {          
                return implode("#",$this->properties);
        }

ilParagraphPlugin::setActive ( bool  ) 

sets active to value bool

Parameters:
boolean sets active

Definition at line 195 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 204 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 111 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 102 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 93 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 84 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 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.


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