Esempio n. 1
0
 protected function _determineWidget()
 {
     $component_info = $this->_helper->getMacroWidgetInfo();
     $this->widget_include_file = $component_info['file'];
     $this->widget_class_name = $component_info['class'];
     $this->html_tag = 'wysiwyg';
     $this->has_closing_tag = false;
     $this->set('profile_name', $this->_helper->getProfileName());
 }
Esempio n. 2
0
 function generateTagContent($code)
 {
     if (isset($this->attributeNodes['name']) && !$this->attributeNodes['name']->isConstant()) {
         $code->writePhp($this->getComponentRefCode() . '->setAttribute("name", ');
         $code->writePhp($this->attributeNodes['name']->generateExpression($code));
         $code->writePhp(');' . "\n");
     }
     $code->writePhp($this->getComponentRefCode() . '->initWysiwyg("' . $this->_helper->getProfileName() . '" );' . "\n");
     $code->writePhp($this->getComponentRefCode() . '->renderContents();' . "\n");
 }
 function _initWysiwyg()
 {
     $this->_helper = new lmbWysiwygConfigurationHelper();
     $this->_helper->setProfileName($this->getAttribute('profile_name'));
     if (!$this->getAttribute('rows')) {
         $this->setAttribute('rows', $this->_helper->getOption('rows'));
     }
     if (!$this->getAttribute('cols')) {
         $this->setAttribute('cols', $this->_helper->getOption('cols'));
     }
     if (!$this->getAttribute('width')) {
         $this->setAttribute('width', $this->_helper->getOption('width'));
     }
     if (!$this->getAttribute('height')) {
         $this->setAttribute('height', $this->_helper->getOption('height'));
     }
 }
 function testGetMacroWidgetInfo()
 {
     $this->assertIdentical($this->_helper->getMacroWidgetInfo(), array('file' => 'limb/wysiwyg/src/macro/lmbMacroFCKEditorWidget.class.php', 'class' => 'lmbMacroFCKEditorWidget'));
 }