本文整理汇总了PHP中rex_i18n::rawMsg方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_i18n::rawMsg方法的具体用法?PHP rex_i18n::rawMsg怎么用?PHP rex_i18n::rawMsg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rex_i18n
的用法示例。
在下文中一共展示了rex_i18n::rawMsg方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: formatElement
public function formatElement()
{
$name = $this->getFieldName();
$qry = 'SELECT ' . $this->labelField . ',' . $name . ' FROM ' . $this->table->getTableName() . ' WHERE 1=1';
if ($this->whereCondition != '') {
$qry .= ' AND (' . $this->whereCondition . ')';
}
// Im Edit Mode das Feld selbst nicht als Position einfügen
if ($this->table->isEditMode()) {
$qry .= ' AND (' . $name . '!=' . $this->getValue() . ')';
}
$qry .= ' ORDER BY ' . $name;
$sql = rex_sql::factory();
$sql->setQuery($qry);
$this->select->addOption(rex_i18n::msg($this->firstOptionMsg), 1);
$value = 1;
foreach ($sql as $opt) {
$value = $opt->getValue($name) + 1;
$this->select->addOption(rex_i18n::rawMsg($this->optionMsg, $opt->getValue($this->labelField)), $value);
}
if (!$this->table->isEditMode()) {
$this->select->setSelected($value);
}
return parent::formatElement();
}
示例2: foreach
foreach ($types as $class) {
$cronjob = rex_cronjob::factory($class);
if ($cronjob instanceof rex_cronjob) {
$cronjobs[$class] = $cronjob;
$select->addOption($cronjob->getTypeName(), $class);
}
}
if ($func == 'add') {
$select->setSelected('rex_cronjob_phpcode');
}
$activeType = $field->getValue();
if ($func != 'add' && !in_array($activeType, $types)) {
if (!$activeType && !$field->getValue()) {
$warning = rex_i18n::rawMsg('cronjob_not_found');
} else {
$warning = rex_i18n::rawMsg('cronjob_type_not_found', $field->getValue(), $activeType);
}
rex_response::sendRedirect(rex_url::currentBackendPage([rex_request('list', 'string') . '_warning' => $warning], false));
}
$form->addFieldset($this->i18n('type_parameters'));
$fieldContainer = $form->addContainerField('parameters');
$fieldContainer->setAttribute('style', 'display: none');
$fieldContainer->setMultiple(false);
$fieldContainer->setActive($activeType);
$env_js = '';
$visible = [];
foreach ($cronjobs as $group => $cronjob) {
$disabled = [];
$envs = (array) $cronjob->getEnvironments();
if (!in_array('frontend', $envs)) {
$disabled[] = 0;
示例3: rex_fragment
<?php
echo rex_view::title('yform');
$fragment = new rex_fragment();
$fragment->setVar('class', 'info');
$fragment->setVar('title', rex_i18n::msg('yform_description_title'), false);
$fragment->setVar('body', rex_i18n::rawMsg('yform_description_all', false) . rex_yform::showHelp(true, true), false);
echo $fragment->parse('core/page/section.php');
示例4: init
public function init()
{
// ----- EXTENSION POINT
// IDs aller Feldtypen bei denen das Parameter-Feld eingeblendet werden soll
$typeFields = rex_extension::registerPoint(new rex_extension_point('METAINFO_TYPE_FIELDS', [REX_METAINFO_FIELD_SELECT, REX_METAINFO_FIELD_RADIO, REX_METAINFO_FIELD_CHECKBOX, REX_METAINFO_FIELD_REX_MEDIA_WIDGET, REX_METAINFO_FIELD_REX_MEDIALIST_WIDGET, REX_METAINFO_FIELD_REX_LINK_WIDGET, REX_METAINFO_FIELD_REX_LINKLIST_WIDGET]));
$field = $this->addReadOnlyField('prefix', $this->metaPrefix);
$field->setLabel(rex_i18n::msg('minfo_field_label_prefix'));
$field = $this->addTextField('name');
$field->setLabel(rex_i18n::msg('minfo_field_label_name'));
$field = $this->addSelectField('priority');
$field->setLabel(rex_i18n::msg('minfo_field_label_priority'));
$select = $field->getSelect();
$select->setSize(1);
$select->addOption(rex_i18n::msg('minfo_field_first_priority'), 1);
// Im Edit Mode das Feld selbst nicht als Position einf�gen
$qry = 'SELECT name,priority FROM ' . $this->tableName . ' WHERE `name` LIKE "' . $this->metaPrefix . '%"';
if ($this->isEditMode()) {
$qry .= ' AND id != ' . $this->getParam('field_id');
}
$qry .= ' ORDER BY priority';
$sql = rex_sql::factory();
$sql->setQuery($qry);
$value = 1;
for ($i = 0; $i < $sql->getRows(); ++$i) {
$value = $sql->getValue('priority') + 1;
$select->addOption(rex_i18n::rawMsg('minfo_field_after_priority', $sql->getValue('name')), $value);
$sql->next();
}
if (!$this->isEditMode()) {
$select->setSelected($value);
}
$field = $this->addTextField('title');
$field->setLabel(rex_i18n::msg('minfo_field_label_title'));
$field->setNotice(rex_i18n::msg('minfo_field_notice_title'));
$gq = rex_sql::factory();
$gq->setQuery('SELECT dbtype,id FROM ' . rex::getTablePrefix() . 'metainfo_type');
$textFields = [];
foreach ($gq->getArray() as $f) {
if ($f['dbtype'] == 'text') {
$textFields[$f['id']] = $f['id'];
}
}
$field = $this->addSelectField('type_id');
$field->setLabel(rex_i18n::msg('minfo_field_label_type'));
$field->setAttribute('onchange', 'meta_checkConditionalFields(this, new Array(' . implode(',', $typeFields) . '), new Array(' . implode(',', $textFields) . '));');
$select = $field->getSelect();
$select->setSize(1);
$qry = 'SELECT label,id FROM ' . rex::getTablePrefix() . 'metainfo_type';
$select->addSqlOptions($qry);
$notices = '';
for ($i = 1; $i < REX_METAINFO_FIELD_COUNT; ++$i) {
if (rex_i18n::hasMsg('minfo_field_params_notice_' . $i)) {
$notices .= '<span id="metainfo-field-params-notice-' . $i . '" style="display:none">' . rex_i18n::msg('minfo_field_params_notice_' . $i) . '</span>' . "\n";
}
}
$notices .= '
<script type="text/javascript">
var needle = new getObj("' . $field->getAttribute('id') . '");
meta_checkConditionalFields(needle.obj, new Array(' . implode(',', $typeFields) . '), new Array(' . implode(',', $textFields) . '));
</script>';
$field = $this->addTextAreaField('params');
$field->setLabel(rex_i18n::msg('minfo_field_label_params'));
$field->setNotice($notices);
$field = $this->addTextAreaField('attributes');
$field->setLabel(rex_i18n::msg('minfo_field_label_attributes'));
$notice = rex_i18n::msg('minfo_field_attributes_notice') . "\n";
$field->setNotice($notice);
$field = $this->addTextAreaField('callback');
$field->setLabel(rex_i18n::msg('minfo_field_label_callback'));
$notice = rex_i18n::msg('minfo_field_label_notice') . "\n";
$field->setNotice($notice);
$field = $this->addTextField('default');
$field->setLabel(rex_i18n::msg('minfo_field_label_default'));
if ('clang_' !== $this->metaPrefix) {
$attributes = [];
$attributes['internal::fieldClass'] = 'rex_form_restrictons_element';
$field = $this->addField('', 'restrictions', null, $attributes);
$field->setLabel(rex_i18n::msg('minfo_field_label_restrictions'));
$field->setAttribute('size', 10);
$field->setAttribute('class', 'form-control');
}
parent::init();
}
示例5: array
/**
* yform
* @author jan.kristinus[at]redaxo[dot]org Jan Kristinus
* @author <a href="http://www.yakamara.de">www.yakamara.de</a>
*/
echo rex_view::title(rex_i18n::msg('yform_email_templates'));
$table = rex::getTablePrefix() . 'yform_email_template';
$bezeichner = rex_i18n::msg('yform_email_template');
$csuchfelder = array('name', 'mail_from', 'mail_subject', 'body');
$func = rex_request('func', 'string', '');
$page = rex_request('page', 'string', '');
$template_id = rex_request('template_id', 'int');
$content = '';
$show_list = true;
if ($func == 'edit' || $func == 'add') {
echo rex_view::info(rex_i18n::rawMsg('yform_email_info_text'));
$form_data = [];
$form_data[] = 'text|name|translate:yform_email_key';
$form_data[] = 'validate|empty|name|Bitte key eintragen';
$form_data[] = 'text|mail_from|translate:yform_email_from';
$form_data[] = 'text|mail_from_name|translate:yform_email_from_name';
$form_data[] = 'text|subject|translate:yform_email_subject';
$form_data[] = 'textarea|body|translate:yform_email_body';
$form_data[] = 'textarea|body_html|translate:yform_email_body_html';
$form_data[] = 'be_medialist|attachments|translate:yform_email_attachments';
$form_data[] = 'action|showtext|Vielen Dank|||1';
$yform = rex_yform::factory();
$yform->setObjectparams('form_action', 'index.php?page=yform/email/index&func=' . $func);
$yform->setFormData(implode("\n", $form_data));
if ($func == 'edit') {
$yform->setObjectparams('submit_btn_label', rex_i18n::msg('yform_save'));
示例6: rex_mediapool_saveMedia
/**
* Holt ein upgeloadetes File und legt es in den Medienpool
* Dabei wird kontrolliert ob das File schon vorhanden ist und es
* wird eventuell angepasst, weiterhin werden die Fileinformationen übergeben.
*
* @param array $FILE
* @param int $rex_file_category
* @param array $FILEINFOS
* @param string $userlogin
* @param bool $doSubindexing
*
* @return array
*/
function rex_mediapool_saveMedia($FILE, $rex_file_category, $FILEINFOS, $userlogin = null, $doSubindexing = true)
{
$rex_file_category = (int) $rex_file_category;
$gc = rex_sql::factory();
$gc->setQuery('SELECT * FROM ' . rex::getTablePrefix() . 'media_category WHERE id=' . $rex_file_category);
if ($gc->getRows() != 1) {
$rex_file_category = 0;
}
$isFileUpload = isset($FILE['tmp_name']);
if ($isFileUpload) {
$doSubindexing = true;
}
$FILENAME = $FILE['name'];
$FILESIZE = $FILE['size'];
$FILETYPE = $FILE['type'];
$NFILENAME = rex_mediapool_filename($FILENAME, $doSubindexing);
$message = [];
// ----- alter/neuer filename
$srcFile = rex_path::media($FILENAME);
$dstFile = rex_path::media($NFILENAME);
$success = true;
if ($isFileUpload) {
// Fileupload?
if (!@move_uploaded_file($FILE['tmp_name'], $dstFile)) {
$message[] = rex_i18n::msg('pool_file_movefailed');
$success = false;
}
} else {
// Filesync?
if (!@rename($srcFile, $dstFile)) {
$message[] = rex_i18n::msg('pool_file_movefailed');
$success = false;
}
}
if ($success) {
@chmod($dstFile, rex::getFilePerm());
// get widht height
$size = @getimagesize($dstFile);
if ($FILETYPE == '' && isset($size['mime'])) {
$FILETYPE = $size['mime'];
}
$FILESQL = rex_sql::factory();
$FILESQL->setTable(rex::getTablePrefix() . 'media');
$FILESQL->setValue('filetype', $FILETYPE);
$FILESQL->setValue('title', $FILEINFOS['title']);
$FILESQL->setValue('filename', $NFILENAME);
$FILESQL->setValue('originalname', $FILENAME);
$FILESQL->setValue('filesize', $FILESIZE);
if ($size) {
$FILESQL->setValue('width', $size[0]);
$FILESQL->setValue('height', $size[1]);
}
$FILESQL->setValue('category_id', $rex_file_category);
$FILESQL->addGlobalCreateFields($userlogin);
$FILESQL->addGlobalUpdateFields($userlogin);
$FILESQL->insert();
if ($isFileUpload) {
$message[] = rex_i18n::msg('pool_file_added');
}
if ($NFILENAME != $FILENAME) {
$message[] = rex_i18n::rawMsg('pool_file_renamed', $FILENAME, $NFILENAME);
}
rex_media_cache::deleteList($rex_file_category);
}
$RETURN['title'] = $FILEINFOS['title'];
$RETURN['type'] = $FILETYPE;
$RETURN['msg'] = implode('<br />', $message);
// Aus BC gruenden hier mit int 1/0
$RETURN['ok'] = $success ? 1 : 0;
$RETURN['filename'] = $NFILENAME;
$RETURN['old_filename'] = $FILENAME;
if ($size) {
$RETURN['width'] = $size[0];
$RETURN['height'] = $size[1];
}
// ----- EXTENSION POINT
if ($success) {
rex_extension::registerPoint(new rex_extension_point('MEDIA_ADDED', '', $RETURN));
}
return $RETURN;
}
示例7:
if ($func == 'htaccess') {
rex_yrewrite::copyHtaccess();
echo rex_view::success($this->i18n('htaccess_hasbeenset'));
}
}
$content = '
<h3>' . $this->i18n('htaccess_set') . '</h3>
<p>' . rex_i18n::rawMsg('yrewrite_htaccess_info') . '</p>
<p><a class="btn btn-primary" href="' . rex_url::currentBackendPage(['func' => 'htaccess']) . '">' . $this->i18n('yrewrite_htaccess_set') . '</a></p>
<h3>' . $this->i18n('info_headline') . '</h3>
<p>' . rex_i18n::rawMsg('yrewrite_info_text') . '</p>
<h3>' . $this->i18n('info_seo') . '</h3>
<p>' . rex_i18n::rawMsg('yrewrite_info_seo_text') . '
<br /><br />' . highlight_string('<?php
$seo = new rex_yrewrite_seo();
echo $seo->getTitleTag();
echo $seo->getDescriptionTag();
echo $seo->getRobotsTag();
echo $seo->getHreflangTags();
?>', true) . '
</p>
';
$fragment = new rex_fragment();
$fragment->setVar('title', $this->i18n('setup'));
$fragment->setVar('body', $content, false);
echo $fragment->parse('core/page/section.php');
示例8: rex_fragment
echo $headline;
$fragment = new rex_fragment();
$fragment->setVar('title', rex_i18n::msg('setup_606'), false);
$fragment->setVar('body', $content, false);
$fragment->setVar('buttons', $buttons, false);
$content = $fragment->parse('core/page/section.php');
echo '<form class="rex-js-createadminform" action="' . rex_url::backendController() . '" method="post" autocomplete="off">' . $content . '</form>';
}
// ---------------------------------- step 7 . thank you . setup false
if ($step == 7) {
$configFile = rex_path::data('config.yml');
$config = array_merge(rex_file::getConfig(rex_path::core('default.config.yml')), rex_file::getConfig($configFile));
$config['setup'] = false;
if (rex_file::putConfig($configFile, $config)) {
$errmsg = '';
rex_file::delete(rex_path::cache('config.yml.cache'));
} else {
$errmsg = rex_i18n::msg('setup_701');
}
$headline = rex_view::title(rex_i18n::msg('setup_700'));
$content = '<h3>' . rex_i18n::msg('setup_703') . '</h3>';
$content .= rex_i18n::rawMsg('setup_704', '<a href="' . rex_url::backendController() . '">', '</a>');
$content .= '<p>' . rex_i18n::msg('setup_705') . '</p>';
$buttons = '<a class="btn btn-setup" href="' . rex_url::backendController() . '">' . rex_i18n::msg('setup_706') . '</a>';
echo $headline;
$fragment = new rex_fragment();
$fragment->setVar('heading', rex_i18n::msg('setup_702'), false);
$fragment->setVar('body', $content, false);
$fragment->setVar('buttons', $buttons, false);
echo $fragment->parse('core/page/section.php');
}
示例9: htmlspecialchars
$mi->update();
echo rex_view::success('Modul "' . $module_name . '" wurde aktualisiert');
} else {
$mi->setValue('name', $yform_module_name);
$mi->insert();
$module_id = (int) $mi->getLastId();
$module_name = $yform_module_name;
echo rex_view::success('yform Modul wurde angelegt unter "' . $yform_module_name . '"');
}
}
$content .= '<p>' . $this->i18n('install_modul_description') . '<br /><br />';
if ($module_id > 0) {
$content .= '<p><a class="btn btn-primary" href="index.php?page=yform/overview&install=1&module_id=' . $module_id . '" class="rex-button">' . $this->i18n('install_update_module', htmlspecialchars($module_name)) . '</a></p>';
} else {
$content .= '<p><a class="btn btn-primary" href="index.php?page=yform/overview&install=1" class="rex-button">' . $this->i18n('install_yform_modul', $yform_module_name) . '</a></p>';
}
$content .= '</p>';
$fragment = new rex_fragment();
$fragment->setVar('title', $this->i18n('install_modul'), false);
$fragment->setVar('body', $content, false);
echo $fragment->parse('core/page/section.php');
}
$content = rex_i18n::rawMsg('yform_description_all', false);
$fragment = new rex_fragment();
$fragment->setVar('title', $this->i18n('description'), false);
$fragment->setVar('body', $content, false);
echo $fragment->parse('core/page/section.php');
$fragment = new rex_fragment();
$fragment->setVar('title', $this->i18n('description_type_heading'), false);
$fragment->setVar('content', rex_yform::showHelp(true, true), false);
echo $fragment->parse('core/page/section.php');
示例10: getHelpLinks
private static function getHelpLinks()
{
return [rex_i18n::msg('textile_links'), ['links_intern' => [[rex_i18n::rawMsg('textile_link_internal') . ':redaxo://5'], [rex_i18n::rawMsg('textile_link_internal_anchor') . ':redaxo://7#AGB']], 'links_extern' => [[rex_i18n::rawMsg('textile_link_external') . ':http://www.redaxo.org'], [rex_i18n::rawMsg('textile_link_external_anchor') . ':http://www.redaxo.org#news']], 'links_attributes' => [[rex_i18n::rawMsg('textile_link_attr_title') . ':media/test.jpg'], [rex_i18n::rawMsg('textile_link_attr_rel') . ':media/test.jpg'], [rex_i18n::rawMsg('textile_link_attr_title_rel') . ':media/test.jpg']], 'anchor' => [[rex_i18n::rawMsg('textile_link_anchor') . ":\n\np(#Impressum). " . rex_i18n::msg('textile_link_anchor_text')]]]];
}
示例11: rex_fragment
$n = [];
$n['label'] = '<label for="autoload_css">' . $this->i18n('config_assets_css') . '</label>';
$n['field'] = '<input type="checkbox" id="autoload_css" name="config[autoload_css]" value="1" ' . ($this->getConfig('autoload_css') ? ' checked="checked"' : '') . '>';
$formElements[] = $n;
$n = [];
$n['label'] = '<label for="autoload_js">' . $this->i18n('config_assets_js') . '</label>';
$n['field'] = '<input type="checkbox" id="autoload_js" name="config[autoload_js]" value="1" ' . ($this->getConfig('autoload_js') ? ' checked="checked"' : '') . '>';
$formElements[] = $n;
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$assets = $fragment->parse('core/form/checkbox.php');
$formElements = [];
$n = [];
$n['label'] = $this->i18n('config_load_assets');
$n['field'] = $assets;
$n['note'] = rex_i18n::rawMsg('emailobfuscator_config_assets_note', rex_url::backendPage('packages', ['subpage' => 'help', 'package' => $this->getPackageId()]));
$formElements[] = $n;
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$content .= $fragment->parse('core/form/form.php');
$content .= '
</fieldset>';
/* whitelist */
$content .= '
<fieldset>
<legend>' . $this->i18n('config_whitelist') . '</legend>';
$formElements = [];
$n = [];
$n['label'] = '<label for="emailobfuscator-config-articles">' . $this->i18n('config_articles') . '</label>';
$n['field'] = rex_var_linklist::getWidget(1, 'config[articles]', $this->getConfig('articles'));
$formElements[] = $n;
示例12: rex_fragment
<?php
if (rex_request('func', 'string') == 'clearall') {
rex_article_slice_history::clearAllHistory();
echo rex_view::success($this->i18n('deleted'));
}
$content = rex_i18n::rawMsg('structure_history_info_content');
$content .= '<p><a href="' . rex_url::currentBackendPage(['func' => 'clearall']) . '" class="btn btn-setup">' . $this->i18n('button_delete_history') . '</a></p>';
$fragment = new rex_fragment();
$fragment->setVar('title', $this->i18n('title_info'));
$fragment->setVar('body', $content, false);
echo $fragment->parse('core/page/section.php');
$fragment = new rex_fragment();
$fragment->setVar('title', $this->i18n('todos'));
$fragment->setVar('body', rex_i18n::rawMsg('structure_history_todos_content', true), false);
echo $fragment->parse('core/page/section.php');
示例13:
<?php
/** @var rex_addon $this */
$content = '';
$fragment = new \rex_fragment();
$fragment->setVar('title', $this->i18n('demo_base_description_install_heading'), false);
$fragment->setVar('body', rex_i18n::rawMsg('demo_base_description_install_body', rex_url::backendPage('backup/import/server')), false);
$content = $fragment->parse('core/page/section.php');
echo $content;