XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
TextareaEditor.class.php
Go to the documentation of this file.
1<?php
7
8if (!defined('XOOPS_ROOT_PATH')) {
9 exit();
10}
11
13{
17 public function preBlockFilter()
18 {
19 $this->mRoot->mDelegateManager->add('Site.TextareaEditor.BBCode.Show', 'Legacy_TextareaEditor::renderBBCode', XCUBE_DELEGATE_PRIORITY_FINAL);
20 $this->mRoot->mDelegateManager->add('Site.TextareaEditor.HTML.Show', 'Legacy_TextareaEditor::renderHTML', XCUBE_DELEGATE_PRIORITY_FINAL);
21 $this->mRoot->mDelegateManager->add('Site.TextareaEditor.None.Show', 'Legacy_TextareaEditor::renderNone', XCUBE_DELEGATE_PRIORITY_FINAL);
22 }
23
29 public static function renderBBCode(&$html, $params)
30 {
31 if (!XC_CLASS_EXISTS('xoopsformelement')) {
32 require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
33 }
34
35 $form =new XoopsFormDhtmlTextArea($params['name'], $params['name'], $params['value'], $params['rows'], $params['cols']);
36 $form->setId($params['id']);
37 if (null !== $params['class']) {
38 $form->setClass($params['class']);
39 }
40
41 $html = $form->render();
42 }
43
49 public static function renderHtml(&$html, $params)
50 {
51 self::renderBBCode($html, $params);
52 }
53
59 public static function renderNone(&$html, $params)
60 {
61 if (!XC_CLASS_EXISTS('xoopsformelement')) {
62 require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
63 }
64
65 $form =new XoopsFormTextArea($params['name'], $params['name'], $params['value'], $params['rows'], $params['cols']);
66 $form->setId($params['id']);
67 if (null !== $params['class']) {
68 $form->setClass($params['class']);
69 }
70
71 $html = $form->render();
72 }
73}
static renderNone(&$html, $params)
preBlockFilter()
[Abstract] Executes the logic, when the controller executes preBlockFilter().
static renderHtml(&$html, $params)
static renderBBCode(&$html, $params)