当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Form_Element_Textarea::render方法代码示例

本文整理汇总了PHP中Zend_Form_Element_Textarea::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Textarea::render方法的具体用法?PHP Zend_Form_Element_Textarea::render怎么用?PHP Zend_Form_Element_Textarea::render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Form_Element_Textarea的用法示例。


在下文中一共展示了Zend_Form_Element_Textarea::render方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render

 public function render(Zend_View_Interface $view = NULL)
 {
     if (!$view) {
         $view = $this->getView();
     }
     if ($view && method_exists($view, 'registerHelper')) {
         $helper = new BuggyPress_View_Helper_FormWPEditor();
         $view->registerHelper($helper, 'formWPEditor');
     }
     return parent::render($view);
 }
开发者ID:jbrinley,项目名称:BuggyPress,代码行数:11,代码来源:BuggyPress_Form_Element_WPEditor.php

示例2: render

    public function render(Zend_View_Interface $view = null)
    {
        $js = '$.include("/zkernel/ctl/edit_area/edit_area_full.js", function() {
	EAL.prototype.window_loaded();
	editAreaLoader.init({
		id: "' . $this->getName() . '"
		,start_highlight: true
		,allow_resize: "no"
		,toolbar: "undo,redo,highlight"
		,allow_toggle: false
		,language: "ru"
		,syntax: "' . $this->getAttrib('syntax') . '"
		,change_callback: "cb_' . $this->getName() . '"
	});
	window.cb_' . $this->getName() . ' = function(id) { $("#' . $this->getName() . '").val(editAreaLoader.getValue(id)); };
});
';
        $this->getView()->inlineScript('script', $js);
        return parent::render($view);
    }
开发者ID:s-kalaus,项目名称:zkernel,代码行数:20,代码来源:Editarea.php

示例3: render

    public function render(Zend_View_Interface $view = null)
    {
        $a = $this->getAttribs();
        if ($this->getView()->control()->config->wysiwyg == 'mce') {
            unset($a['helper']);
            $o = array('script_url' => "/zkernel/ctl/mce/tiny_mce.js", 'theme' => "advanced", 'language' => $this->lang, 'content_css' => "/img/style.css", 'remove_script_host' => true, 'relative_urls' => false, 'add_form_submit_trigger' => false, 'plugins' => "safari,inlinepopups,table,advimage,advlink,media,print,contextmenu,paste,fullscreen,xhtmlxtras,imagemanager,filemanager,pagebreak,zanchor,noneditable,tabfocus,style", 'extended_valid_elements' => "iframe[name|src|framespacing|border|frameborder|scrolling|title|height|width],object[declare|classid|codebase|data|type|codetype|archive|standby|height|width|usemap|name|tabindex|align|border|hspace|vspace],script[type|src]", 'theme_advanced_blockformats' => "blockquote,h1,h2,h3,h4,h5,h6", 'theme_advanced_toolbar_location' => "top", 'theme_advanced_toolbar_align' => "left", 'theme_advanced_buttons1' => "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect,|,sub,sup", 'theme_advanced_buttons2' => "cut,copy,paste,pastetext,pasteword,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,charmap,hr,|,image,file,media,|,forecolor,backcolor", 'theme_advanced_buttons3' => "tablecontrols,|,styleprops,|,removeformat,|,print,|,newdocument,fullscreen,|,code,|,pagebreak" . (APPLICATION_ENV == 'production' ? '' : ',|,zanchor'));
            if ($a) {
                $o = array_merge($o, $a);
            }
            $js = '$.include([
	"/zkernel/js/jquery/jquery.tinymce.js"
], function() {
    $("textarea[name=' . $this->getName() . ']")
    	.addClass("ui-state-disabled")
    	.mousedown(function() { return false; })
    	.focus(function() { return false; })
    	.keydown(function() { return false; })
    	.tinymce(' . Zend_Json::encode($o) . ');
});
';
        } else {
            if ($this->getView()->control()->config->wysiwyg == 'ck') {
                $o = array('customConfig' => '', 'skin' => 'v2', 'baseHref' => '/', 'contentsCss' => '/img/style.css', 'language' => 'ru', 'resize_enabled' => false, 'toolbarCanCollapse' => false, 'toolbar' => array(array('Bold', 'Italic', 'Underline', 'Strike'), array('JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'), array('Format', 'Font', 'FontSize'), array('Subscript', 'Superscript'), '/', array('Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'), array('NumberedList', 'BulletedList'), array('Outdent', 'Indent'), array('Blockquote'), array('Undo', 'Redo'), array('Link', 'Unlink', 'Anchor', 'SpecialChar', 'HorizontalRule'), array('Image', 'Flash'), array('TextColor', 'BGColor'), '/', array('Table'), array('RemoveFormat'), array('Print'), array('NewPage', 'Maximize'), array('Source'), array('PageBreak')), 'filebrowserBrowseUrl' => '/zkernel/ctl/ck/ckfinder/ckfinder.html', 'filebrowserImageBrowseUrl' => '/zkernel/ctl/ck/ckfinder/ckfinder.html?Type=Images', 'filebrowserFlashBrowseUrl' => '/zkernel/ctl/ck/ckfinder/ckfinder.html?Type=Flash', 'filebrowserUploadUrl' => '/zkernel/ctl/ck/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files', 'filebrowserImageUploadUrl' => '/zkernel/ctl/ck/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images', 'filebrowserFlashUploadUrl' => '/zkernel/ctl/ck/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash');
                if ($a) {
                    $o = array_merge($o, $a);
                }
                $js = '$.include([
	"/zkernel/ctl/ck/ckeditor.js",
	"/zkernel/ctl/ck/adapters/jquery.js"
], function() {
	var opt = ' . Zend_Json::encode($o) . ';
	var o = $("textarea[name=' . $this->getName() . ']");
	opt.width = (o[0].offsetWidth / o.parent()[0].offsetWidth * 100) + "%";
	opt.height = o[0].offsetHeight + "px";
	o.val(o.val().replace("<!-- pagebreak -->", "<div style=\\"page-break-after: always;\\">\\n	<span style=\\"display: none;\\">&nbsp;</span></div>"));
    o.addClass("ui-state-disabled")
		.mousedown(function() { return false; })
    	.focus(function() { return false; })
    	.keydown(function() { return false; })
    	.ckeditor(function() {}, opt);
});
';
            } else {
                if ($this->getView()->control()->config->wysiwyg == 'redactor') {
                    $o = array('path' => '/zkernel/ctl/redactor', 'focus' => false, 'removeClasses' => false, 'removeStyles' => false, 'convertLinks' => false, 'autosave' => false, 'imageGetJson' => '/z/fu/source/redactor/type/json', 'imageUpload' => '/z/fu/source/redactor/type/image', 'linkFileUpload' => '/z/fu/source/redactor/type/url', 'fileUpload' => '/z/fu/source/redactor/type/file');
                    if ($a) {
                        $o = array_merge($o, $a);
                    }
                    $js = '$.include([
	"/zkernel/ctl/redactor/redactor.js"
], function() {
	var opt = ' . Zend_Json::encode($o) . ';
	var o = $("textarea[name=' . $this->getName() . ']");
	o.parent().width(o[0].offsetWidth);
	o.val(o.val().replace("<!-- pagebreak -->", "<hr />"));
    o.redactor(opt);
});
$.include(["/zkernel/ctl/redactor/css/redactor.css|link"]);
';
                }
            }
        }
        $this->getView()->inlineScript('script', $js);
        return parent::render($view);
    }
开发者ID:s-kalaus,项目名称:zkernel,代码行数:65,代码来源:Mce.php


注:本文中的Zend_Form_Element_Textarea::render方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。