本文整理汇总了PHP中Action::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Action::init方法的具体用法?PHP Action::init怎么用?PHP Action::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Action
的用法示例。
在下文中一共展示了Action::init方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
//$this->layout = 'login_layout';
$this->template = "errorpage";
parent::init();
}
示例2: init
public function init()
{
parent::init();
}
示例3: MySql
include_once 'controller/helper/helper_mail.class.php';
include_once 'controller/action/action.class.php';
include_once 'controller/action/action_add.class.php';
// Déclarartion des variables
$mySql = new MySql();
$queries = new Queries();
$HelperPagination = new HelperPagination();
$HelperOther = new HelperOther();
$HelperLayout = new HelperLayout();
$Action = new Action();
$ActionAdd = new ActionAdd();
$HelperMail = new HelperMail();
if (!empty($var->categorie)) {
// Test si une catégorie a été choisie
$module_dispatch = $var->module;
if ($Action->init($lang, $mySql, $queries, $module_dispatch, $var->submit, $var->action, $var->idUrl)) {
// Save, update, delete record
$var->module_output .= $Action->output;
$var->type = $Action->type;
$var->idUrl = $Action->idInsert;
} else {
$Action->sendNewsletters($lang, $mySql, $queries, $module_dispatch, $HelperMail, $var->sujetSend, $var->contenuSend, $var->groupeSend);
$var->module_output .= $Action->output;
}
if (!empty($var->ss_categorie)) {
// Test la sous catégorie
$search_column = explode(",", $settings['columns'][$module_dispatch]);
// Pagination
$pagination = $HelperPagination->pagination($mySql, $queries, PAGINATION, $module_dispatch, $mySql->escape($var->ss_categorie), $mySql->escape($var->search), $search_column);
// Construction du header
$action_header = ADD;
示例4: init
public function init()
{
$this->template = "edit_user_pop_up";
$this->layout = "plain_layout";
parent::init();
}
示例5: runActions
public function runActions()
{
// Run requested actions and save responses in array
if (isset($this->request['formname'])) {
$this->response['_form'][$this->request['formname']] = array();
}
if (isset($this->request['do'])) {
$action = new Action();
if (!is_array($this->request['do'])) {
$action->init($this->request['do']);
$this->response[$this->request['do']] = $action->run();
if (isset($this->request['formname'])) {
$this->response['_form'][$this->request['formname']] = $this->response[$do];
}
} else {
foreach ($this->request['do'] as $do) {
$action->init($do, $this->request);
// Run action + catch returned response
$this->response[$do] = $action->run();
if (isset($this->response[$do][0]['redirect']['url'])) {
// If redirect requested by action, do so
if (!isset($this->response[$do][0]['redirect']['post']) || !is_array($this->response[$do][0]['redirect']['post'])) {
$this->response[$do][0]['redirect']['post'] = array();
}
$this->redirectToUrl($this->response[$do][0]['redirect']['url'], $this->response[$do][0]['redirect']['post']);
}
if (isset($this->request['formname'])) {
// If action was triggert by a from, save response in form array as well
// Just for easier message handling
$this->response['_form'][$this->request['formname']] = array_merge($this->response['_form'][$this->request['formname']], $this->response[$do]);
}
}
}
}
}