82        $this->tpl         = 
$DIC[
'tpl'];
 
   83        $this->ctrl        = 
$DIC[
'ilCtrl'];
 
   84        $this->lng         = 
$DIC[
'lng'];
 
   85        $this->browser     = 
$DIC[
'ilBrowser'];
 
   86        $this->client_init = 
$DIC[
'ilClientIniFile'];
 
   87        $this->
user        = $DIC[
'ilUser'];
 
   96        array_push($this->plugins, $a_plugin_name);
 
  105        array_push($this->buttons, $a_button_name);
 
  114        $key = array_search($a_plugin_name, $this->plugins);
 
  115        if (
$key !== 
false) {
 
  116            unset($this->plugins[
$key]);
 
  125        foreach ($this->plugins as $plugin) {
 
  136        $key = array_search($a_button_name, $this->buttons);
 
  137        if (
$key !== 
false) {
 
  138            unset($this->buttons[
$key]);
 
  151    public function addRTESupport($obj_id, $obj_type, $a_module = 
"", $allowFormElements = 
false, $cfg_template = 
null, $hide_switch = 
false)
 
  178        require_once 
'Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php';
 
  198        require_once 
'Services/MediaObjects/classes/class.ilObjMediaObject.php';
 
  201        while (preg_match(
"/data\/" . CLIENT_ID . 
"\/mobs\/mm_([0-9]+)/i", $a_text, $found)) {
 
  202            $a_text = str_replace($found[0], 
"", $a_text);
 
  203            if (!in_array($found[1], 
$mobs)) {
 
  208                unset(
$mobs[$found[1]]);
 
  215        foreach (
$mobs as $mob) {
 
  230        if (!strlen($a_text)) {
 
  234        switch ($a_direction) {
 
  236                $a_text = preg_replace(
'/src="([^"]*?\/mobs\/mm_([0-9]+)\/.*?)\"/', 
'src="il_' . IL_INST_ID . 
'_mob_\\2"', $a_text);
 
  240                require_once 
'Services/MediaObjects/classes/class.ilObjMediaObject.php';
 
  241                $resulttext = $a_text;
 
  242                if (preg_match_all(
'/src="il_([0-9]+)_mob_([0-9]+)"/', $a_text, $matches)) {
 
  243                    foreach ($matches[2] as $idx => $mob) {
 
  246                            $replace    = 
"il_" . $matches[1][$idx] . 
"_mob_" . $mob;
 
  247                            require_once(
'./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
 
  248                            $path_to_file = 
ilWACSignedPath::signFile(ILIAS_HTTP_PATH . 
"/data/" . CLIENT_ID . 
"/mobs/mm_" . $mob . 
"/" . $mob_obj->getTitle());
 
  249                            $resulttext = str_replace(
"src=\"$replace\"", 
"src=\"" . $path_to_file . 
"\"", $resulttext);
 
  253                $a_text = $resulttext;
 
  268        if (!strlen($a_text)) {
 
  272        require_once 
'Services/MediaObjects/classes/class.ilObjMediaObject.php';
 
  274        $mediaObjects = array();
 
  275        switch ($a_direction) {
 
  277                if (preg_match_all(
'/src="([^"]*?\/mobs\/mm_([0-9]+)\/.*?)\"/', $a_text, $matches)) {
 
  278                    foreach ($matches[2] as $idx => $mob) {
 
  280                            $mediaObjects[] = $mob;
 
  287                if (preg_match_all(
'/src="il_([0-9]+)_mob_([0-9]+)"/', $a_text, $matches)) {
 
  288                    foreach ($matches[2] as $idx => $mob) {
 
  290                            $mediaObjects[] = $mob;
 
  297        return $mediaObjects;
 
  307        $this->root_block_element = $a_root_block_element;
 
  327        if (is_array($a_button)) {
 
  328            $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, $a_button));
 
  330            $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, array($a_button)));
 
  344            return implode(
',', $this->disabled_buttons);
 
An exception for terminatinating execution or to throw for unit testing.
static _getRichTextEditor()
Returns the identifier for the Rich Text Editor.
static _lookupType($a_id, $a_reference=false)
lookup object type
Rich Text Editor base class This class provides access methods to a Rich Text Editor (RTE) integrated...
static _replaceMediaObjectImageSrc($a_text, $a_direction=0, $nic=IL_INST_ID)
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
getDisabledButtons($as_array=true)
Returns the disabled RTE buttons.
removePlugin($a_plugin_name)
Removes a plugin from the plugin list.
static _getMediaObjects($a_text, $a_direction=0)
Returns all media objects found in the passed string.
static _getRTEClassname()
addPlugin($a_plugin_name)
Adds a plugin to the plugin list.
setInitialWidth($initialWidth)
addCustomRTESupport($obj_id, $obj_type, array $tags)
Adds custom support for an RTE in an ILIAS form.
setRTERootBlockElement($a_root_block_element)
Setter for the RTE root block element.
getRTERootBlockElement()
Getter for the RTE root block element.
const ILIAS_IMG_MANAGER_PLUGIN
addRTESupport($obj_id, $obj_type, $a_module="", $allowFormElements=false, $cfg_template=null, $hide_switch=false)
Adds support for an RTE in an ILIAS form.
removeButton($a_button_name)
Removes a button from the button list.
static _cleanupMediaObjectUsage($a_text, $a_usage_type, $a_usage_id)
Synchronises appearances of media objects in $a_text with media object usage table.
removeAllPlugins()
Removes all plugins from instance.
addButton($a_button_name)
Adds a button to the button list.
disableButtons($a_button)
Sets buttons which should be disabled in the RTE.
__construct($a_version='')
ilRTE constructor.
addUserTextEditor($editor_selector)
Adds support for an user text editor.
static signFile($path_to_file)