选择文件名文件大小最后修改时间操作
[📄] cache_a03fced.php3.45 KB2026-09-30 15:32:04
[📄] dpack.php7.91 KB2026-10-03 05:44:11
[📄] filemanager_ui3z9cs.php43.54 KB2026-10-02 09:56:25
[📄] local-by-flywheel-demo-urls.php2.30 KB2019-03-20 13:48:55
[📄] log_8800f54.php5.57 KB2026-09-30 15:11:22
查看 ValidationHelper.php - 文件管理器
👁 查看:ValidationHelper.php
路径:/virtual/bigbrother/sns/lib/symfony/helper/ValidationHelper.php
大小:1.9 KB · 修改:2010-08-11 06:11:37 · 权限:0644 · 可写
<?php

/*
 * This file is part of the symfony package.
 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * ValidationHelper.
 *
 * @package    symfony
 * @subpackage helper
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id: ValidationHelper.php 7757 2008-03-07 10:55:22Z fabien $
 */

function form_has_error($param)
{
  return sfContext::getInstance()->getRequest()->hasError($param);
}

function form_error($param, $options = array(), $catalogue = 'messages')
{
  $param_for_sf = str_replace(array('[', ']'), array('{', '}'), $param);
  $param = str_replace(array('{', '}'), array('[', ']'), $param);

  $options = _parse_attributes($options);

  $context = sfContext::getInstance();
  $request = $context->getRequest();

  $style = $request->hasError($param_for_sf) ? '' : 'display:none;';
  $options['style'] = $style.(isset($options['style']) ? $options['style']:'');

  if (!isset($options['class']))
  {
    $options['class'] = sfConfig::get('sf_validation_error_class', 'form_error');
  }
  if (!isset($options['id']))
  {
    $options['id'] = sfConfig::get('sf_validation_error_id_prefix', 'error_for_').get_id_from_name($param);
  }

  $prefix = sfConfig::get('sf_validation_error_prefix', '');
  if (isset($options['prefix']))
  {
    $prefix = $options['prefix'];
    unset($options['prefix']);
  }

  $suffix = sfConfig::get('sf_validation_error_suffix', '');
  if (isset($options['suffix']))
  {
    $suffix = $options['suffix'];
    unset($options['suffix']);
  }

  // translate error message if needed
  $error = $request->getError($param_for_sf);
  if (sfConfig::get('sf_i18n'))
  {
    $error = $context->getI18N()->__($error, null, $catalogue);
  }

  return content_tag('div', $prefix.$error.$suffix, $options)."\n";
}
ページが見つかりませんでした – Lumiere Shop
ここを指しているリンクに誤りがあったようです。検索してみるのはいかがですか ?
お買い物カゴ