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


PHP WFModelEditor::removeKeys方法代码示例

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


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

示例1: getConfig

 public static function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     wfimport('admin.models.editor');
     $model = new WFModelEditor();
     $tags = array();
     if ($wf->getParam('media.iframes', 0)) {
         $tags[] = 'iframe';
     }
     if ($wf->getParam('media.audio', 1)) {
         $tags[] = 'audio';
     }
     if ($wf->getParam('media.video', 1)) {
         $tags[] = 'video';
     }
     if (in_array('audio', $tags) || in_array('video', $tags)) {
         $tags[] = 'source';
     }
     if ($wf->getParam('media.embed', 1)) {
         $tags[] = 'embed';
     }
     if ($wf->getParam('media.object', 1)) {
         $tags[] = 'object';
         $tags[] = 'param';
     }
     $model->removeKeys($settings['invalid_elements'], $tags);
     $settings['media_strict'] = $wf->getParam('media.strict', 1, 1);
     $settings['media_version_flash'] = $wf->getParam('media.version_flash', '10,1,53,64', '10,1,53,64');
     $settings['media_version_windowsmedia'] = $wf->getParam('media.version_windowsmedia', '10,00,00,3646', '10,00,00,3646');
     $settings['media_version_shockwave'] = $wf->getParam('media.version_shockwave', '10,2,0,023', '10,2,0,023');
     $settings['media_version_quicktime'] = $wf->getParam('media.version_quicktime', '7,3,0,0', '7,3,0,0');
     $settings['media_version_java'] = $wf->getParam('media.version_java', '1,5,0,0', '1,5,0,0');
 }
开发者ID:jimyb3,项目名称:mathematicalteachingsite,代码行数:33,代码来源:config.php

示例2: getConfig

    public static function getConfig(&$settings) {
        require_once(dirname(__FILE__) . '/filemanager.php');
        
        // set plugin
        JRequest::setVar('plugin', 'filemanager');
        
        $plugin = new WFFileManagerPlugin();

        if ($plugin->getParam('inline_upload', $plugin->getParam('dragdrop_upload', 1, 0), 0)) {            
            // backwards compatability
            if (method_exists($plugin, 'getFileTypes')) {                     
                $types  =  $plugin->getFileTypes();
            } else {
                $settings['filemanager_dragdrop_upload'] = true;
                $types =  $plugin->getBrowser()->getFileSystem()->get('filetypes');
            }

            $settings['filemanager_upload'] = json_encode(array(
                'max_size'  => $plugin->getParam('max_size', 1024),
                'filetypes' => $types
            ));
        }
        
        // remove iframe if we have enabled google docs stuff
        if ($plugin->getParam('googledocs_enable', 1)) {
            wfimport('admin.models.editor');
            $model = new WFModelEditor();
            $model->removeKeys($settings['invalid_elements'], array('iframe'));
        }
    }
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:30,代码来源:config.php

示例3: getConfig

 public static function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     $model = new WFModelEditor();
     if ($wf->getParam('mediamanager.aggregator.youtube.enable', 1) || $wf->getParam('mediamanager.aggregator.vimeo.enable', 1)) {
         $model->removeKeys($settings['invalid_elements'], array('iframe'));
     }
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:8,代码来源:config.php

示例4: getConfig

 public static function getConfig(&$settings)
 {
     // Get JContentEditor instance
     wfimport('admin.models.editor');
     $model = new WFModelEditor();
     $wf = WFEditor::getInstance();
     if (!in_array('code', $settings['plugins'])) {
         $settings['plugins'][] = 'code';
     }
     $settings['code_php'] = $wf->getParam('editor.allow_php', 0, 0, 'boolean');
     $settings['code_script'] = $wf->getParam('editor.allow_javascript', 0, 0, 'boolean');
     $settings['code_style'] = $wf->getParam('editor.allow_css', 0, 0, 'boolean');
     $settings['code_cdata'] = $wf->getParam('editor.cdata', 1, 1, 'boolean');
     // Invalid Elements
     if ($settings['code_script']) {
         $model->removeKeys($settings['invalid_elements'], 'script');
     }
     if ($settings['code_style']) {
         $model->removeKeys($settings['invalid_elements'], 'style');
     }
 }
开发者ID:spikart,项目名称:spikart.com.ua,代码行数:21,代码来源:config.php

示例5: getConfig

 public static function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     $model = new WFModelEditor();
     $doctypes = array('XHTML 1.0 Transitional' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', 'XHTML 1.0 Frameset' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">', 'XHTML 1.0 Strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', 'XHTML 1.1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">', 'HTML 4.01 Transitional' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">', 'HTML 4.01 Strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', 'HTML 4.01 Frameset' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">', 'HTML 5' => '<!DOCTYPE HTML>');
     $doctype = $wf->getParam('fullpage.default_doctype', 'HTML 4.01 Transitional', 'HTML 4.01 Transitional');
     $settings['fullpage_fonts'] = $model->getEditorFonts();
     $settings['fullpage_fontsizes'] = $wf->getParam('editor.theme_advanced_font_sizes', '8pt,10pt,12pt,14pt,18pt,24pt,36pt');
     $settings['fullpage_default_doctype'] = isset($doctypes[$doctype]) ? addslashes($doctypes[$doctype]) : '';
     $settings['fullpage_hide_in_source_view'] = $wf->getParam('fullpage.hide_in_source_view', 0, 0);
     $settings['fullpage_default_encoding'] = $wf->getParam('fullpage.default_encoding');
     $settings['fullpage_default_xml_pi'] = $wf->getParam('fullpage.default_xml_pi', 0, 0);
     $settings['fullpage_default_font_family'] = $wf->getParam('fullpage.default_font_family');
     $settings['fullpage_default_title'] = $wf->getParam('fullpage.default_title', 'Untitled Document', 'Untitled Document');
     $settings['fullpage_default_font_size'] = $wf->getParam('fullpage.default_font_size');
     $settings['fullpage_default_text_color'] = $wf->getParam('fullpage.default_text_color');
     $model->removeKeys($settings['invalid_elements'], array('html', 'head', 'meta', 'title', 'body', 'link'));
 }
开发者ID:adjaika,项目名称:J3Base,代码行数:18,代码来源:config.php


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