Exemplo n.º 1
0
 /**
  * Get a CMS_textEditor from given parameters
  * 
  * @param mixed array(), $attrs each key => value is an attribute
  * of this class or an attribute to fckeditor
  * @return CMS_textEditor or null if error
  */
 function getEditorFromParams($attrs)
 {
     if (!is_array($attrs)) {
         CMS_grandFather::raiseError("None array of attributes passed to factory");
         return null;
     }
     $text_editor = new CMS_textEditor($attrs['form'], $attrs['field'], $attrs['value'], $_SERVER["HTTP_USER_AGENT"], '', $attrs['language'], $attrs['width'], $attrs['rows']);
     $fck_attrs = array('ToolbarSet' => $attrs['toolbarset'], 'Width' => $attrs['width'], 'Height' => $attrs['height']);
     $text_editor->setEditorAttributes($fck_attrs);
     return $text_editor;
 }