本文整理汇总了PHP中cmsCore::getWysiwygs方法的典型用法代码示例。如果您正苦于以下问题:PHP cmsCore::getWysiwygs方法的具体用法?PHP cmsCore::getWysiwygs怎么用?PHP cmsCore::getWysiwygs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cmsCore
的用法示例。
在下文中一共展示了cmsCore::getWysiwygs方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getOptions
public function getOptions()
{
return array(new fieldList('editor', array('title' => LANG_PARSER_HTML_EDITOR, 'default' => 'redactor', 'generator' => function ($item) {
$items = array();
$editors = cmsCore::getWysiwygs();
foreach ($editors as $editor) {
$items[$editor] = $editor;
}
return $items;
})), new fieldCheckbox('is_html_filter', array('title' => LANG_PARSER_HTML_FILTERING)), new fieldNumber('teaser_len', array('title' => LANG_PARSER_HTML_TEASER_LEN, 'hint' => LANG_PARSER_HTML_TEASER_LEN_HINT)));
}
示例2: init
public function init()
{
$is_css_cache = cmsCore::getFilesList('cache/static/css', '*.css');
$is_js_cache = cmsCore::getFilesList('cache/static/js', '*.js');
return array(array('type' => 'fieldset', 'title' => LANG_CP_SETTINGS_SITE, 'childs' => array(new fieldCheckbox('is_site_on', array('title' => LANG_CP_SETTINGS_SITE_ENABLED)), new fieldString('off_reason', array('title' => LANG_CP_SETTINGS_SITE_REASON)), new fieldString('sitename', array('title' => LANG_CP_SETTINGS_SITENAME, 'rules' => array(array('required')))), new fieldString('hometitle', array('title' => LANG_CP_SETTINGS_HOMETITLE, 'rules' => array(array('required')))), new fieldList('frontpage', array('title' => LANG_CP_SETTINGS_FP_SHOW, 'generator' => function ($item) {
$items = array('none' => LANG_CP_SETTINGS_FP_SHOW_NONE, 'profile' => LANG_CP_SETTINGS_FP_SHOW_PROFILE);
$ctypes = cmsCore::getModel('content')->getContentTypes();
if ($ctypes) {
foreach ($ctypes as $ctype) {
if (!$ctype['options']['list_on']) {
continue;
}
$items["content:{$ctype['name']}"] = sprintf(LANG_CP_SETTINGS_FP_SHOW_CONTENT, $ctype['title']);
}
}
return $items;
})), new fieldList('ctype_default', array('title' => LANG_CP_SETTINGS_CTYPE_DEF, 'hint' => LANG_CP_SETTINGS_CTYPE_DEF_HINT, 'generator' => function ($item) {
$ctypes = cmsCore::getModel('content')->getContentTypes();
$items[''] = '';
if ($ctypes) {
foreach ($ctypes as $ctype) {
$items[$ctype['name']] = $ctype['title'];
}
}
return $items;
})), new fieldString('metakeys', array('title' => LANG_CP_SETTINGS_METAKEYS)), new fieldText('metadesc', array('title' => LANG_CP_SETTINGS_METADESC)), new fieldCheckbox('is_no_meta', array('title' => LANG_CP_SETTINGS_META_NO_DEFAULT)), new fieldCheckbox('is_sitename_in_title', array('title' => LANG_CP_SETTINGS_IS_SITENAME_IN_TITLE, 'default' => 1)), new fieldCheckbox('is_check_updates', array('title' => LANG_CP_SETTINGS_CHECK_UPDATES)), new fieldString('detect_ip_key', array('title' => LANG_CP_SETTINGS_DETECT_IP_KEY, 'hint' => LANG_CP_SETTINGS_DETECT_IP_KEY_HINT, 'default' => 'REMOTE_ADDR')))), array('type' => 'fieldset', 'title' => LANG_CP_SETTINGS_GUI, 'childs' => array(new fieldList('language', array('title' => LANG_CP_SETTINGS_LANGUAGE, 'generator' => function ($item) {
$langs = cmsCore::getLanguages();
$items = array();
if ($langs) {
foreach ($langs as $lang) {
$items[$lang] = mb_strtoupper($lang);
}
}
return $items;
})), new fieldList('template', array('title' => LANG_CP_SETTINGS_TEMPLATE, 'hint' => '<a href="#" data-url="' . href_to('admin', 'settings', 'theme') . '">' . LANG_CP_SETTINGS_TEMPLATE_OPTIONS . '</a>', 'generator' => function ($item) {
$tpls = cmsCore::getTemplates();
$items = array();
if ($tpls) {
foreach ($tpls as $tpl) {
$items[$tpl] = $tpl;
}
}
return $items;
})), new fieldList('default_editor', array('title' => LANG_CP_SETTINGS_EDITOR, 'default' => 'redactor', 'generator' => function ($item) {
$items = array();
$editors = cmsCore::getWysiwygs();
foreach ($editors as $editor) {
$items[$editor] = $editor;
}
return $items;
})), new fieldCheckbox('show_breadcrumbs', array('title' => LANG_CP_SETTINGS_SHOW_BREADCRUMBS, 'default' => 1)), new fieldCheckbox('min_html', array('title' => LANG_CP_SETTINGS_HTML_MINIFY)), new fieldCheckbox('merge_css', array('title' => LANG_CP_SETTINGS_MERGE_CSS, 'hint' => $is_css_cache ? sprintf(LANG_CP_SETTINGS_CACHE_CLEAN_MERGED, href_to('admin', 'clear_cache', 'css')) : false)), new fieldCheckbox('merge_js', array('title' => LANG_CP_SETTINGS_MERGE_JS, 'hint' => $is_js_cache ? sprintf(LANG_CP_SETTINGS_CACHE_CLEAN_MERGED, href_to('admin', 'clear_cache', 'js')) : false)))), array('type' => 'fieldset', 'title' => LANG_CP_SETTINGS_DATE, 'childs' => array(new fieldList('time_zone', array('title' => LANG_CP_SETTINGS_TIMEZONE, 'generator' => function ($item) {
return cmsCore::getTimeZones();
})), new fieldString('date_format', array('title' => LANG_CP_SETTINGS_DATE_FORMAT, 'rules' => array(array('required')))), new fieldString('date_format_js', array('title' => LANG_CP_SETTINGS_DATE_FORMAT_JS, 'rules' => array(array('required')))))), array('type' => 'fieldset', 'title' => LANG_CP_SETTINGS_MAIL, 'childs' => array(new fieldList('mail_transport', array('title' => LANG_CP_SETTINGS_MAIL_TRANSPORT, 'items' => array('mail' => 'PHP mail()', 'smtp' => 'SMTP', 'sendmail' => 'Sendmail'))), new fieldString('mail_from', array('title' => LANG_CP_SETTINGS_MAIL_FROM, 'rules' => array(array('required')))), new fieldString('mail_from_name', array('title' => LANG_CP_SETTINGS_MAIL_FROM_NAME)), new fieldString('mail_smtp_server', array('title' => LANG_CP_SETTINGS_MAIL_SMTP_HOST)), new fieldNumber('mail_smtp_port', array('title' => LANG_CP_SETTINGS_MAIL_SMTP_PORT)), new fieldCheckbox('mail_smtp_auth', array('title' => LANG_CP_SETTINGS_MAIL_SMTP_AUTH)), new fieldString('mail_smtp_user', array('title' => LANG_CP_SETTINGS_MAIL_SMTP_USER)), new fieldString('mail_smtp_pass', array('title' => LANG_CP_SETTINGS_MAIL_SMTP_PASS, 'is_password' => true)), new fieldList('mail_smtp_enc', array('title' => LANG_CP_SETTINGS_MAIL_SMTP_ENC, 'items' => array(0 => LANG_CP_SETTINGS_MAIL_SMTP_ENC_NO, 'ssl' => LANG_CP_SETTINGS_MAIL_SMTP_ENC_SSL, 'tls' => LANG_CP_SETTINGS_MAIL_SMTP_ENC_TLS))))), array('type' => 'fieldset', 'title' => LANG_CP_SETTINGS_CACHE, 'childs' => array(new fieldCheckbox('cache_enabled', array('title' => LANG_CP_SETTINGS_CACHE_ENABLED)), new fieldNumber('cache_ttl', array('title' => LANG_CP_SETTINGS_CACHE_TTL)), new fieldList('cache_method', array('title' => LANG_CP_SETTINGS_CACHE_METHOD, 'items' => array('files' => 'Files', 'memory' => 'Memcached' . (extension_loaded('memcache') ? '' : ' (' . LANG_CP_SETTINGS_CACHE_METHOD_NO . ')')))), new fieldString('cache_host', array('title' => LANG_CP_SETTINGS_CACHE_HOST)), new fieldNumber('cache_port', array('title' => LANG_CP_SETTINGS_CACHE_PORT)))), array('type' => 'fieldset', 'title' => LANG_CP_SETTINGS_DEBUG, 'childs' => array(new fieldCheckbox('debug', array('title' => LANG_CP_SETTINGS_DEBUG_MODE)), new fieldCheckbox('emulate_lag', array('title' => LANG_CP_SETTINGS_EMULATE_LAG)))), array('type' => 'fieldset', 'title' => LANG_CP_SETTINGS_SECURITY, 'childs' => array(new fieldText('allow_ips', array('title' => LANG_CP_SETTINGS_ALLOW_IPS, 'hint' => LANG_CP_SETTINGS_ALLOW_IPS_HINT)))));
}
示例3: getOptions
public function getOptions()
{
return array(new fieldList('editor', array('title' => LANG_PARSER_HTML_EDITOR, 'default' => cmsConfig::get('default_editor'), 'generator' => function ($item) {
$items = array();
$editors = cmsCore::getWysiwygs();
foreach ($editors as $editor) {
$items[$editor] = $editor;
}
return $items;
})), new fieldCheckbox('is_html_filter', array('title' => LANG_PARSER_HTML_FILTERING)), new fieldCheckbox('build_redirect_link', array('title' => LANG_PARSER_BUILD_REDIRECT_LINK)), new fieldNumber('teaser_len', array('title' => LANG_PARSER_HTML_TEASER_LEN, 'hint' => LANG_PARSER_HTML_TEASER_LEN_HINT)), new fieldCheckbox('in_fulltext_search', array('title' => LANG_PARSER_IN_FULLTEXT_SEARCH, 'hint' => LANG_PARSER_IN_FULLTEXT_SEARCH_HINT, 'default' => false)));
}