コード例 #1
0
ファイル: wikieditor.php プロジェクト: anawu2006/PeerLearning
 /**
  * Constructor
  *
  * @param string $elementName (optional) name of the text field
  * @param string $elementLabel (optional) text field label
  * @param string $attributes (optional) Either a typical HTML attribute string or an associative array
  */
 function __construct($elementName = null, $elementLabel = null, $attributes = null)
 {
     if (isset($attributes['wiki_format'])) {
         $this->wikiformat = $attributes['wiki_format'];
         unset($attributes['wiki_format']);
     }
     if (isset($attributes['files'])) {
         $this->files = $attributes['files'];
         unset($attributes['files']);
     }
     parent::__construct($elementName, $elementLabel, $attributes);
 }
コード例 #2
0
ファイル: htmleditor.php プロジェクト: anawu2006/PeerLearning
 /**
  * Constructor
  *
  * @param string $elementName (optional) name of the html editor
  * @param string $elementLabel (optional) editor label
  * @param array $options set of options to create html editor
  * @param array $attributes (optional) Either a typical HTML attribute string
  *              or an associative array
  */
 public function __construct($elementName = null, $elementLabel = null, $options = array(), $attributes = null)
 {
     parent::__construct($elementName, $elementLabel, $attributes);
     // set the options, do not bother setting bogus ones
     if (is_array($options)) {
         foreach ($options as $name => $value) {
             if (array_key_exists($name, $this->_options)) {
                 if (is_array($value) && is_array($this->_options[$name])) {
                     $this->_options[$name] = @array_merge($this->_options[$name], $value);
                 } else {
                     $this->_options[$name] = $value;
                 }
             }
         }
     }
     $this->_type = 'htmleditor';
     editors_head_setup();
 }