本文整理汇总了PHP中MText类的典型用法代码示例。如果您正苦于以下问题:PHP MText类的具体用法?PHP MText怎么用?PHP MText使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MText类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _
public static function _(){
$isSaved = MRequest::getCookie("profilesissaved",0, MREQUEST_INT);
if($isSaved){
MRequest::setCookie("profilesissaved", 0);
$css = _FM_IS_DEMO ? "rejectedAdvice" : "savedAdvice";
$text = _FM_IS_DEMO ? "notfordemo" : "datasaved";
echo '
<div id="mSavedAdvice" class="'.$css.'"><div>'.MText::_($text).'</div></div>
<script type="text/javascript">
dojo.addOnLoad(function(){
var node = dojo.byId("mSavedAdvice");
dojo.style(node,{opacity: 0});
_fx.fadeOpacity(node,300,0,1,function(){
setTimeout(function(){
var node = dojo.byId("mSavedAdvice");
dojo.style(node,{opacity: 1});
_fx.fadeOpacity(node,400,1,0,function(){
_removeNode(dojo.byId("mSavedAdvice"));
});
},2000);
});
});
</script>
';
}
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:29,代码来源:saved.php
示例2: getInstance
public static function getInstance($handler = null, $options = array())
{
static $now = null;
MCacheStorage::addIncludePath(MPATH_WP_CNT . '/miwi/framework/cache/storage');
if (!isset($handler)) {
$conf = MFactory::getConfig();
$handler = $conf->get('cache_handler');
if (empty($handler)) {
return MError::raiseWarning(500, MText::_('MLIB_CACHE_ERROR_CACHE_HANDLER_NOT_SET'));
}
}
if (is_null($now)) {
$now = time();
}
$options['now'] = $now;
$handler = strtolower(preg_replace('/[^A-Z0-9_\\.-]/i', '', $handler));
$class = 'MCacheStorage' . ucfirst($handler);
if (!class_exists($class)) {
mimport('joomla.filesystem.path');
if ($path = MPath::find(MCacheStorage::addIncludePath(), strtolower($handler) . '.php')) {
include_once $path;
} else {
return MError::raiseWarning(500, MText::sprintf('MLIB_CACHE_ERROR_CACHE_STORAGE_LOAD', $handler));
}
}
return new $class($options);
}
开发者ID:vanie3,项目名称:appland,代码行数:27,代码来源:storage.php
示例3: display
public function display($tpl = null)
{
$document = MFactory::getDocument();
$document->addStyleSheet(MURL_MIWOSQL . '/admin/assets/css/miwosql.css');
// Toolbar
MToolBarHelper::title(MText::_('MiwoSQL') . ' - ' . MText::_('COM_MIWOSQL_RUN_QUERY'), 'miwosql');
if (MiwosqlHelper::is30()) {
MToolBarHelper::custom('run', 'play.png', 'play.png', MText::_('COM_MIWOSQL_RUN_QUERY'), false);
MToolBarHelper::divider();
MToolBarHelper::custom('savequery', 'folder-close.png', 'folder-close.png', MText::_('COM_MIWOSQL_SAVE_QUERY'), false);
MToolBarHelper::divider();
MToolBarHelper::custom('csv', 'upload.png', 'upload.png', MText::_('COM_MIWOSQL_EXPORT_CSV'), false);
} else {
MToolBarHelper::custom('run', 'run.png', 'run.png', MText::_('COM_MIWOSQL_RUN_QUERY'), false);
MToolBarHelper::divider();
MToolBarHelper::custom('savequery', 'savequery.png', 'savequery.png', MText::_('COM_MIWOSQL_SAVE_QUERY'), false);
MToolBarHelper::divider();
MToolBarHelper::custom('csv', 'csv.png', 'csv.png', MText::_('COM_MIWOSQL_EXPORT_CSV'), false);
}
// ACL
if (version_compare(MVERSION, '1.6.0', 'ge') && MFactory::getUser()->authorise('core.admin', 'com_miwosql')) {
MToolBarHelper::divider();
MToolBarHelper::preferences('com_miwosql', '550');
}
$this->data = $this->get('Data');
$this->tables = $this->get('Tables');
$this->prefix = $this->get('Prefix');
parent::display($tpl);
}
开发者ID:vanie3,项目名称:appland,代码行数:29,代码来源:view.html.php
示例4: runSqlFile
public static function runSqlFile($sql_file)
{
$db = MFactory::getDbo();
if (!file_exists($sql_file)) {
return;
}
$buffer = file_get_contents($sql_file);
if ($buffer === false) {
return;
}
$queries = $db->splitSql($buffer);
if (count($queries) == 0) {
return;
}
foreach ($queries as $query) {
$query = trim($query);
if ($query != '' && $query[0] != '#') {
$db->setQuery($query);
if (!$db->query()) {
MError::raiseWarning(1, 'MInstaller::install: ' . MText::_('SQL Error') . " " . $db->stderr(true));
return;
}
}
}
}
开发者ID:vanie3,项目名称:appland,代码行数:25,代码来源:installer.php
示例5: _getFilePosition
public function _getFilePosition()
{
// gzipped file... unpack it first
$position = 0;
$info = @unpack('CCM/CFLG/VTime/CXFL/COS', substr($this->_data, $position + 2));
if (!$info) {
$this->set('error.message', MText::_('MLIB_FILESYSTEM_GZIP_UNABLE_TO_DECOMPRESS'));
return false;
}
$position += 10;
if ($info['FLG'] & $this->_flags['FEXTRA']) {
$XLEN = unpack('vLength', substr($this->_data, $position + 0, 2));
$XLEN = $XLEN['Length'];
$position += $XLEN + 2;
}
if ($info['FLG'] & $this->_flags['FNAME']) {
$filenamePos = strpos($this->_data, "", $position);
$position = $filenamePos + 1;
}
if ($info['FLG'] & $this->_flags['FCOMMENT']) {
$commentPos = strpos($this->_data, "", $position);
$position = $commentPos + 1;
}
if ($info['FLG'] & $this->_flags['FHCRC']) {
$hcrc = unpack('vCRC', substr($this->_data, $position + 0, 2));
$hcrc = $hcrc['CRC'];
$position += 2;
}
return $position;
}
开发者ID:vanie3,项目名称:appland,代码行数:30,代码来源:gzip.php
示例6: getOptions
protected function getOptions()
{
// Initialize variables.
// This gets the connectors available in the platform and supported by the server.
$available = MDatabase::getConnectors();
$supported = $this->element['supported'];
if (!empty($supported)) {
$supported = explode(',', $supported);
foreach ($supported as $support) {
if (in_array($support, $available)) {
$options[$support] = ucfirst($support);
}
}
} else {
foreach ($available as $support) {
$options[$support] = ucfirst($support);
}
}
// This will come into play if an application is installed that requires
// a database that is not available on the server.
if (empty($options)) {
$options[''] = MText::_('MNONE');
}
return $options;
}
开发者ID:vanie3,项目名称:appland,代码行数:25,代码来源:databaseconnection.php
示例7: getOptions
protected function getOptions()
{
MLog::add('MFormFieldEditors is deprecated. Use MFormFieldPlugins instead (with folder="editors").', MLog::WARNING, 'deprecated');
// Get the database object and a new query object.
$db = MFactory::getDBO();
$query = $db->getQuery(true);
// Build the query.
$query->select('element AS value, name AS text');
$query->from('#__extensions');
$query->where('folder = ' . $db->quote('editors'));
$query->where('enabled = 1');
$query->order('ordering, name');
// Set the query and load the options.
$db->setQuery($query);
$options = $db->loadObjectList();
$lang = MFactory::getLanguage();
foreach ($options as $i => $option) {
$lang->load('plg_editors_' . $option->value, MPATH_ADMINISTRATOR, null, false, false) || $lang->load('plg_editors_' . $option->value, MPATH_PLUGINS . '/editors/' . $option->value, null, false, false) || $lang->load('plg_editors_' . $option->value, MPATH_ADMINISTRATOR, $lang->getDefault(), false, false) || $lang->load('plg_editors_' . $option->value, MPATH_PLUGINS . '/editors/' . $option->value, $lang->getDefault(), false, false);
$options[$i]->text = MText::_($option->text);
}
// Check for a database error.
if ($db->getErrorNum()) {
MError::raiseWarning(500, $db->getErrorMsg());
}
// Merge any additional options in the XML definition.
$options = array_merge(parent::getOptions(), $options);
return $options;
}
开发者ID:vanie3,项目名称:appland,代码行数:28,代码来源:editors.php
示例8: getOptions
protected function getOptions()
{
// Initialise variables
$folder = $this->element['folder'];
if (!empty($folder)) {
// Get list of plugins
$db = MFactory::getDbo();
$query = $db->getQuery(true);
$query->select('element AS value, name AS text');
$query->from('#__extensions');
$query->where('folder = ' . $db->q($folder));
$query->where('enabled = 1');
$query->order('ordering, name');
$db->setQuery($query);
$options = $db->loadObjectList();
$lang = MFactory::getLanguage();
foreach ($options as $i => $item) {
$source = MPATH_PLUGINS . '/' . $folder . '/' . $item->value;
$extension = 'plg_' . $folder . '_' . $item->value;
$lang->load($extension . '.sys', MPATH_ADMINISTRATOR, null, false, false) || $lang->load($extension . '.sys', $source, null, false, false) || $lang->load($extension . '.sys', MPATH_ADMINISTRATOR, $lang->getDefault(), false, false) || $lang->load($extension . '.sys', $source, $lang->getDefault(), false, false);
$options[$i]->text = MText::_($item->text);
}
if ($db->getErrorMsg()) {
MError::raiseWarning(500, MText::_('MFRAMEWORK_FORM_FIELDS_PLUGINS_ERROR_FOLDER_EMPTY'));
return '';
}
} else {
MError::raiseWarning(500, MText::_('MFRAMEWORK_FORM_FIELDS_PLUGINS_ERROR_FOLDER_EMPTY'));
}
// Merge any additional options in the XML definition.
$options = array_merge(parent::getOptions(), $options);
return $options;
}
开发者ID:vanie3,项目名称:appland,代码行数:33,代码来源:plugins.php
示例9: getInput
protected function getInput()
{
// Initialize variables.
$html = array();
// Initialize some field attributes.
$class = $this->element['class'] ? ' class="checkboxes ' . (string) $this->element['class'] . '"' : ' class="checkboxes"';
// Start the checkbox field output.
$html[] = '<fieldset id="' . $this->id . '"' . $class . '>';
// Get the field options.
$options = $this->getOptions();
// Build the checkbox field output.
$html[] = '<ul>';
foreach ($options as $i => $option) {
// Initialize some option attributes.
$checked = in_array((string) $option->value, (array) $this->value) ? ' checked="checked"' : '';
$class = !empty($option->class) ? ' class="' . $option->class . '"' : '';
$disabled = !empty($option->disable) ? ' disabled="disabled"' : '';
// Initialize some JavaScript option attributes.
$onclick = !empty($option->onclick) ? ' onclick="' . $option->onclick . '"' : '';
$html[] = '<li>';
$html[] = '<input type="checkbox" id="' . $this->id . $i . '" name="' . $this->name . '"' . ' value="' . htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8') . '"' . $checked . $class . $onclick . $disabled . '/>';
$html[] = '<label for="' . $this->id . $i . '"' . $class . '>' . MText::_($option->text) . '</label>';
$html[] = '</li>';
}
$html[] = '</ul>';
// End the checkbox field output.
$html[] = '</fieldset>';
return implode($html);
}
开发者ID:vanie3,项目名称:appland,代码行数:29,代码来源:checkboxes.php
示例10: getOptions
protected function getOptions()
{
// Initialize variables.
$options = array();
// Initialize some field attributes.
$key = $this->element['key_field'] ? (string) $this->element['key_field'] : 'value';
$value = $this->element['value_field'] ? (string) $this->element['value_field'] : (string) $this->element['name'];
$translate = $this->element['translate'] ? (string) $this->element['translate'] : false;
$query = (string) $this->element['query'];
// Get the database object.
$db = MFactory::getDBO();
// Set the query and get the result list.
$db->setQuery($query);
$items = $db->loadObjectlist();
// Check for an error.
if ($db->getErrorNum()) {
MError::raiseWarning(500, $db->getErrorMsg());
return $options;
}
// Build the field options.
if (!empty($items)) {
foreach ($items as $item) {
if ($translate == true) {
$options[] = MHtml::_('select.option', $item->{$key}, MText::_($item->{$value}));
} else {
$options[] = MHtml::_('select.option', $item->{$key}, $item->{$value});
}
}
}
// Merge any additional options in the XML definition.
$options = array_merge(parent::getOptions(), $options);
return $options;
}
开发者ID:vanie3,项目名称:appland,代码行数:33,代码来源:sql.php
示例11: getInput
protected function getInput()
{
// Initialize variables.
$html = array();
// Initialize some field attributes.
$class = $this->element['class'] ? ' class="radio ' . (string) $this->element['class'] . '"' : ' class="radio"';
// Start the radio field output.
$html[] = '<fieldset id="' . $this->id . '"' . $class . '>';
// Get the field options.
$options = $this->getOptions();
// Build the radio field output.
foreach ($options as $i => $option) {
// Initialize some option attributes.
$checked = (string) $option->value == (string) $this->value ? ' checked="checked"' : '';
$class = !empty($option->class) ? ' class="' . $option->class . '"' : '';
$disabled = !empty($option->disable) ? ' disabled="disabled"' : '';
// Initialize some JavaScript option attributes.
$onclick = !empty($option->onclick) ? ' onclick="' . $option->onclick . '"' : '';
$html[] = '<input type="radio" id="' . $this->id . $i . '" name="' . $this->name . '"' . ' value="' . htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8') . '"' . $checked . $class . $onclick . $disabled . '/>';
$html[] = '<label for="' . $this->id . $i . '"' . $class . '>' . MText::alt($option->text, preg_replace('/[^a-zA-Z0-9_\\-]/', '_', $this->fieldname)) . '</label>';
}
// End the radio field output.
$html[] = '</fieldset>';
return implode($html);
}
开发者ID:vanie3,项目名称:appland,代码行数:25,代码来源:radio.php
示例12: getLabel
protected function getLabel()
{
$html = array();
$class = $this->element['class'] ? (string) $this->element['class'] : '';
$html[] = '<span class="spacer">';
$html[] = '<span class="before"></span>';
$html[] = '<span class="' . $class . '">';
if ((string) $this->element['hr'] == 'true') {
$html[] = '<hr class="' . $class . '" />';
} else {
$label = '';
// Get the label text from the XML element, defaulting to the element name.
$text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];
$text = $this->translateLabel ? MText::_($text) : $text;
// Build the class for the label.
$class = !empty($this->description) ? 'hasTip' : '';
$class = $this->required == true ? $class . ' required' : $class;
// Add the opening label tag and main attributes attributes.
$label .= '<label id="' . $this->id . '-lbl" class="' . $class . '"';
// If a description is specified, use it to build a tooltip.
if (!empty($this->description)) {
$label .= ' title="' . htmlspecialchars(trim($text, ':') . '::' . ($this->translateDescription ? MText::_($this->description) : $this->description), ENT_COMPAT, 'UTF-8') . '"';
}
// Add the label text and closing tag.
$label .= '>' . $text . '</label>';
$html[] = $label;
}
$html[] = '</span>';
$html[] = '<span class="after"></span>';
$html[] = '</span>';
return implode('', $html);
}
开发者ID:vanie3,项目名称:appland,代码行数:32,代码来源:spacer.php
示例13: _getCommand
protected function _getCommand($ref, $com, $override, $component)
{
// Get Help URL
mimport('framework.language.help');
$url = MHelp::createURL($ref, $com, $override, $component);
$url = htmlspecialchars($url, ENT_QUOTES);
$cmd = "Miwi.popupWindow('{$url}', '" . MText::_('MHELP', true) . "', 700, 500, 1)";
return $cmd;
}
开发者ID:vanie3,项目名称:appland,代码行数:9,代码来源:help.php
示例14: cloak
public static function cloak($mail, $mailto = true, $text = '', $email = true)
{
// Convert text
$mail = self::_convertEncoding($mail);
// Split email by @ symbol
$mail = explode('@', $mail);
$mail_parts = explode('.', $mail[1]);
// Random number
$rand = rand(1, 100000);
$replacement = "<script type='text/javascript'>";
$replacement .= "\n <!--";
$replacement .= "\n var prefix = 'ma' + 'il' + 'to';";
$replacement .= "\n var path = 'hr' + 'ef' + '=';";
$replacement .= "\n var addy" . $rand . " = '" . @$mail[0] . "' + '@';";
$replacement .= "\n addy" . $rand . " = addy" . $rand . " + '" . implode("' + '.' + '", $mail_parts) . "';";
if ($mailto) {
// Special handling when mail text is different from mail address
if ($text) {
if ($email) {
// Convert text
$text = self::_convertEncoding($text);
// Split email by @ symbol
$text = explode('@', $text);
$text_parts = explode('.', $text[1]);
$replacement .= "\n var addy_text" . $rand . " = '" . @$text[0] . "' + '@' + '" . implode("' + '.' + '", @$text_parts) . "';";
} else {
$replacement .= "\n var addy_text" . $rand . " = '" . $text . "';";
}
$replacement .= "\n document.write('<a ' + path + '\\'' + prefix + ':' + addy" . $rand . " + '\\'>');";
$replacement .= "\n document.write(addy_text" . $rand . ");";
$replacement .= "\n document.write('<\\/a>');";
} else {
$replacement .= "\n document.write('<a ' + path + '\\'' + prefix + ':' + addy" . $rand . " + '\\'>');";
$replacement .= "\n document.write(addy" . $rand . ");";
$replacement .= "\n document.write('<\\/a>');";
}
} else {
$replacement .= "\n document.write(addy" . $rand . ");";
}
$replacement .= "\n //-->";
$replacement .= '\\n </script>';
// XHTML compliance no Javascript text handling
$replacement .= "<script type='text/javascript'>";
$replacement .= "\n <!--";
$replacement .= "\n document.write('<span style=\\'display: none;\\'>');";
$replacement .= "\n //-->";
$replacement .= "\n </script>";
$replacement .= MText::_('MLIB_HTML_CLOAKING');
$replacement .= "\n <script type='text/javascript'>";
$replacement .= "\n <!--";
$replacement .= "\n document.write('</');";
$replacement .= "\n document.write('span>');";
$replacement .= "\n //-->";
$replacement .= "\n </script>";
return $replacement;
}
开发者ID:vanie3,项目名称:appland,代码行数:56,代码来源:email.php
示例15: user
public static function user($noUser = true)
{
$optionNo = '';
if ($noUser) {
$optionNo = '<option value="0">' . MText::_('MLIB_HTML_BATCH_USER_NOUSER') . '</option>';
}
// Create the batch selector to select a user on a selection list.
$lines = array('<label id="batch-user-lbl" for="batch-user" class="hasTip"' . ' title="' . MText::_('MLIB_HTML_BATCH_USER_LABEL') . '::' . MText::_('MLIB_HTML_BATCH_USER_LABEL_DESC') . '">', MText::_('MLIB_HTML_BATCH_USER_LABEL'), '</label>', '<select name="batch[user_id]" class="inputbox" id="batch-user-id">', '<option value="">' . MText::_('MLIB_HTML_BATCH_USER_NOCHANGE') . '</option>', $optionNo, MHtml::_('select.options', MHtml::_('user.userlist'), 'value', 'text'), '</select>');
return implode("\n", $lines);
}
开发者ID:vanie3,项目名称:appland,代码行数:10,代码来源:batch.php
示例16: fetchButton
public function fetchButton($type = 'Link', $name = 'back', $text = '', $url = null)
{
$text = MText::_($text);
$class = $this->fetchIconClass($name);
$doTask = $this->_getCommand($url);
$html = "<a class=\"add-new-h2\" href=\"{$doTask}\">\n";
$html .= "{$text}\n";
$html .= "</a>\n";
return $html;
}
开发者ID:vanie3,项目名称:appland,代码行数:10,代码来源:link.php
示例17: extract
public function extract($archive, $destination, $options = array())
{
// Initialise variables.
$this->_data = null;
if (!extension_loaded('bz2')) {
$this->set('error.message', MText::_('MLIB_FILESYSTEM_BZIP_NOT_SUPPORTED'));
return MError::raiseWarning(100, $this->get('error.message'));
}
if (!isset($options['use_streams']) || $options['use_streams'] == false) {
// Old style: read the whole file and then parse it
if (!($this->_data = MFile::read($archive))) {
$this->set('error.message', 'Unable to read archive');
return MError::raiseWarning(100, $this->get('error.message'));
}
$buffer = bzdecompress($this->_data);
unset($this->_data);
if (empty($buffer)) {
$this->set('error.message', 'Unable to decompress data');
return MError::raiseWarning(100, $this->get('error.message'));
}
if (MFile::write($destination, $buffer) === false) {
$this->set('error.message', 'Unable to write archive');
return MError::raiseWarning(100, $this->get('error.message'));
}
} else {
// New style! streams!
$input = MFactory::getStream();
$input->set('processingmethod', 'bz');
// use bzip
if (!$input->open($archive)) {
$this->set('error.message', MText::_('MLIB_FILESYSTEM_BZIP_UNABLE_TO_READ'));
return MError::raiseWarning(100, $this->get('error.message'));
}
$output = MFactory::getStream();
if (!$output->open($destination, 'w')) {
$this->set('error.message', MText::_('MLIB_FILESYSTEM_BZIP_UNABLE_TO_WRITE'));
$input->close();
// close the previous file
return MError::raiseWarning(100, $this->get('error.message'));
}
do {
$this->_data = $input->read($input->get('chunksize', 8196));
if ($this->_data) {
if (!$output->write($this->_data)) {
$this->set('error.message', MText::_('MLIB_FILESYSTEM_BZIP_UNABLE_TO_WRITE_FILE'));
return MError::raiseWarning(100, $this->get('error.message'));
}
}
} while ($this->_data);
$output->close();
$input->close();
}
return true;
}
开发者ID:vanie3,项目名称:appland,代码行数:54,代码来源:bzip2.php
示例18: getOptions
protected function getOptions()
{
// Initialize variables.
$options = array();
// Convert to name => name array.
foreach (MCache::getStores() as $store) {
$options[] = MHtml::_('select.option', $store, MText::_('MLIB_FORM_VALUE_CACHE_' . $store), 'value', 'text');
}
$options = array_merge(parent::getOptions(), $options);
return $options;
}
开发者ID:vanie3,项目名称:appland,代码行数:11,代码来源:cachehandler.php
示例19: display
public function display($tpl = null)
{
$document = MFactory::getDocument();
$document->addStyleSheet(MURL_MIWOSQL . '/admin/assets/css/miwosql.css');
// Toolbar
MToolBarHelper::title(MText::_('MiwoSQL'), 'miwosql');
MToolBarHelper::save();
MToolBarHelper::cancel();
$this->row = $this->get('QueryData');
parent::display($tpl);
}
开发者ID:vanie3,项目名称:appland,代码行数:11,代码来源:view.edit.php
示例20: getOptions
protected function getOptions()
{
// Initialise variables.
$options = array();
$extension = $this->element['extension'] ? (string) $this->element['extension'] : (string) $this->element['scope'];
$published = (string) $this->element['published'];
$name = (string) $this->element['name'];
// Load the category options for a given extension.
if (!empty($extension)) {
// Filter over published state or not depending upon if it is present.
if ($published) {
$options = MHtml::_('category.options', $extension, array('filter.published' => explode(',', $published)));
} else {
$options = MHtml::_('category.options', $extension);
}
// Verify permissions. If the action attribute is set, then we scan the options.
if ((string) $this->element['action']) {
// Get the current user object.
$user = MFactory::getUser();
// For new items we want a list of categories you are allowed to create in.
if (!$this->form->getValue($name)) {
foreach ($options as $i => $option) {
// To take save or create in a category you need to have create rights for that category
// unless the item is already in that category.
// Unset the option if the user isn't authorised for it. In this field assets are always categories.
if ($user->authorise('core.create', $extension . '.category.' . $option->value) != true) {
unset($options[$i]);
}
}
} else {
$categoryOld = $this->form->getValue($name);
foreach ($options as $i => $option) {
// If you are only allowed to edit in this category but not edit.state, you should not get any
// option to change the category.
if ($user->authorise('core.edit.state', $extension . '.category.' . $categoryOld) != true) {
if ($option->value != $categoryOld) {
unset($options[$i]);
}
} elseif ($user->authorise('core.create', $extension . '.category.' . $option->value) != true && $option->value != $categoryOld) {
unset($options[$i]);
}
}
}
}
if (isset($this->element['show_root'])) {
array_unshift($options, MHtml::_('select.option', '0', MText::_('MGLOBAL_ROOT')));
}
} else {
MError::raiseWarning(500, MText::_('MLIB_FORM_ERROR_FIELDS_CATEGORY_ERROR_EXTENSION_EMPTY'));
}
// Merge any additional options in the XML definition.
$options = array_merge(parent::getOptions(), $options);
return $options;
}
开发者ID:vanie3,项目名称:appland,代码行数:54,代码来源:category.php
注:本文中的MText类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论