示例#1
0
 /**
  *  Ethna_Errorオブジェクトを追加する
  *
  *  @access public
  *  @param  string              $name   エラーに対応するフォーム項目名(不要ならnull)
  *  @param  object  Ethna_Error $error  エラーオブジェクト
  */
 public function addObject($name, $error)
 {
     $elt = array();
     $elt['name'] = $name;
     $elt['object'] = $error;
     $this->error_list[] = $elt;
     // ログ出力(補足)
     $af = $this->_getActionForm();
     $logger = $this->_getLogger();
     $logger->log(LOG_NOTICE, '{form} -> [%s]', $this->action_form->getName($name));
 }
示例#2
0
 /**
  * action formを設定する
  *
  * @param $action_name
  */
 public function setupActionForm($action_name)
 {
     $form_name = $this->getActionFormName($action_name);
     $this->action_form = new $form_name($this);
     $this->getBackend()->setActionForm($this->action_form);
     $this->action_form->setFormDef_PreHelper();
     $this->action_form->setFormVars();
 }
示例#3
0
文件: ViewClass.php 项目: t-f-m/ethna
 /**
  *  レンダラオブジェクトを取得する
  *
  *  @access protected
  *  @return object  Ethna_Renderer  レンダラオブジェクト
  */
 public function _getRenderer()
 {
     $c = $this->backend->getController();
     $renderer = $c->getRenderer();
     $form_array = $this->af->getArray();
     $app_array = $this->af->getAppArray();
     $app_ne_array = $this->af->getAppNEArray();
     $renderer->setPropByRef('form', $form_array);
     $renderer->setPropByRef('app', $app_array);
     $renderer->setPropByRef('app_ne', $app_ne_array);
     $message_list = Ethna_Util::escapeHtml($this->ae->getMessageList());
     $renderer->setPropByRef('errors', $message_list);
     if (isset($_SESSION)) {
         $tmp_session = Ethna_Util::escapeHtml($_SESSION);
         $renderer->setPropByRef('session', $tmp_session);
     }
     $renderer->setProp('script', htmlspecialchars(basename($_SERVER['SCRIPT_NAME']), ENT_QUOTES, $this->ctl->getClientEncoding()));
     $renderer->setProp('request_uri', isset($_SERVER['REQUEST_URI']) ? htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES, $this->ctl->getClientEncoding()) : '');
     $renderer->setProp('config', $this->config->get());
     return $renderer;
 }
 /**
  *  フォーム値定義を設定する
  *
  *  @access protected
  */
 function _setFormDef()
 {
     return parent::_setFormDef();
 }
示例#5
0
 /**
  *  Ethna_SOAP_ActionFormクラスのコンストラクタ
  *
  *  @access public
  *  @param  object  Ethna_ActionError   $action_error   アクションエラーオブジェクト
  */
 public function __construct($action_error)
 {
     $this->form = $this->arg;
     parent::__construct($action_error);
 }
 /**
  *  Ethna_SOAP_ActionFormクラスのコンストラクタ
  *
  *  @access public
  *  @param  object  Ethna_ActionError   $action_error   アクションエラーオブジェクト
  */
 function Ethna_SOAP_ActionForm(&$action_error)
 {
     $this->form =& $this->arg;
     parent::Ethna_ActionForm($action_error);
 }