Beispiel #1
0
 /**
  *  Ethna_ActionClassのコンストラクタ
  *
  *  @access public
  *  @param  object  Ethna_Backend   $backend    backendオブジェクト
  */
 public function __construct($backend)
 {
     $c = $backend->getController();
     $this->backend = $backend;
     $this->config = $this->backend->getConfig();
     $this->i18n = $this->backend->getI18N();
     $this->action_error = $this->backend->getActionError();
     $this->ae = $this->action_error;
     $this->action_form = $this->backend->getActionForm();
     $this->af = $this->action_form;
     $this->session = $this->backend->getSession();
     $this->plugin = $this->backend->getPlugin();
     $this->logger = $this->backend->getLogger();
     $this->preloadPlugin();
 }
Beispiel #2
0
 /**
  *  Ethna_ViewClassのコンストラクタ
  *
  *  @access public
  *  @param  object  Ethna_Backend   $backend    backendオブジェクト
  *  @param  string  $forward_name   ビューに関連付けられている遷移名
  *  @param  string  $forward_path   ビューに関連付けられているテンプレートファイル名
  */
 public function __construct($backend, $forward_name, $forward_path)
 {
     $c = $backend->getController();
     $this->ctl = $c;
     $this->backend = $backend;
     $this->config = $this->backend->getConfig();
     $this->i18n = $this->backend->getI18N();
     $this->logger = $this->backend->getLogger();
     $this->plugin = $this->backend->getPlugin();
     $this->action_error = $this->backend->getActionError();
     $this->ae = $this->action_error;
     $this->action_form = $this->backend->getActionForm();
     $this->af = $this->action_form;
     $this->session = $this->backend->getSession();
     $this->forward_name = $forward_name;
     $this->forward_path = $forward_path;
     foreach (array_keys($this->helper_action_form) as $action) {
         $this->addActionFormHelper($action);
     }
 }
Beispiel #3
0
 public function setup()
 {
     parent::setup();
     $this->controller = $this->prophesize("Ethna_Controller");
     $this->backend = $this->prophesize("Ethna_Backend");
     $this->config = $this->prophesize("Ethna_Config");
     $this->i18n = $this->prophesize("Ethna_I18N");
     $this->action_error = $this->prophesize("Ethna_ActionError");
     $this->action_form = $this->prophesize("Ethna_ActionForm");
     $this->session = $this->prophesize("Ethna_Session");
     $this->plugin = $this->prophesize("Ethna_Plugin");
     $this->logger = $this->prophesize("Ethna_Logger");
     $this->backend->getLogger()->willReturn($this->logger);
     $this->backend->getPlugin()->willReturn($this->plugin);
     $this->backend->getSession()->willReturn($this->session);
     $this->backend->getActionForm()->willReturn($this->action_form);
     $this->backend->getActionError()->willReturn($this->action_error);
     $this->backend->getI18N()->willReturn($this->i18n);
     $this->backend->getConfig()->willReturn($this->config);
     $this->backend->getController()->willReturn($this->controller);
     $this->controller->getBackend()->willReturn($this->backend);
 }