本文整理汇总了PHP中ControllerBase::newAction方法的典型用法代码示例。如果您正苦于以下问题:PHP ControllerBase::newAction方法的具体用法?PHP ControllerBase::newAction怎么用?PHP ControllerBase::newAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ControllerBase
的用法示例。
在下文中一共展示了ControllerBase::newAction方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: newAction
public function newAction($r_controller = null, $r_action = null, $r_id = null)
{
if ($this->session->has("couche_id")) {
$this->tag->setDefault("couche_id", $this->session->get("couche_id"));
}
parent::newAction($r_controller, $r_action, $r_id);
}
示例2: newAction
public function newAction($r_controller = null, $r_action = null, $r_id = null)
{
if ($this->session->has("classe_entite_id")) {
$this->tag->setDefault("classe_entite_id", $this->session->get("classe_entite_id"));
}
$this->tag->setDefault("acces", "L");
parent::newAction($r_controller, $r_action, $r_id);
}
示例3: newAction
public function newAction($r_controller = null, $r_action = null, $r_id = null)
{
$this->persistent->parameters = null;
$phql = "SELECT c.id, CONCAT(c.nom,\" , \",c.prenom) as nom FROM IgoContact c order by nom";
$contact_desc = $this->modelsManager->executeQuery($phql);
$this->view->setVar("contact_desc", $contact_desc);
parent::newAction($r_controller, $r_action, $r_id);
}
示例4: newAction
public function newAction($r_controller = null, $r_action = null, $r_id = null)
{
// $this->definirGroupesPourSelecteur();
// $this->definirCouchesPourSelecteur();
parent::newAction($r_controller, $r_action, $r_id);
}
示例5: newAction
public function newAction($r_controller = null, $r_action = null, $r_id = null)
{
$this->tag->setDefault("geometrie_type", "V");
parent::newAction($r_controller, $r_action, $r_id);
}
示例6: newAction
/**
* Displayes the creation form
*/
public function newAction($r_controller = null, $r_action = null, $r_id = null)
{
parent::newAction($r_controller, $r_action, $r_id);
/*
$igo_couche = IgoCouche::findFirstByid($id);
if (!$igo_couche) {
$this->flash->error("Couche $id non-trouvée");
} else {
$this->tag->setDefault("acces", $igo_couche->IgoGeometrie->acces);
}*/
$this->setGeometrieDesc();
if ($this->session->has("geometrie_id")) {
$geometrie_id = $this->session->get("geometrie_id");
$this->tag->setDefault("geometrie_id", $geometrie_id);
$igo_geometrie = IgoGeometrie::findFirstByid($geometrie_id);
$this->tag->setDefault("acces", $igo_geometrie->acces);
}
}
示例7: traiteMapfileAction
public function traiteMapfileAction($r_controller = null, $r_action = null, $r_id = null)
{
parent::newAction($r_controller, $r_action, $r_id);
if (!$this->request->isPost()) {
return $this->dispatcher->forward(array("controller" => $this->ctlName, "action" => "index"));
}
$this->view->pick("gestion_couche/creation");
$code = $this->request->getPost("code");
$code = $this->traiteClass($code);
$lignes = explode("\n", $code);
$mf_layer_meta_def = "";
$mf_layer_def = "";
$meta = false;
$projection = false;
foreach ($lignes as $ligne) {
if ($projection) {
$this->tag->setDefault('mf_layer_projection', trim($ligne, " '\"\t\n\r"));
$projection = false;
continue;
}
if (trim($ligne) == "" || trim($ligne) == "LAYER") {
continue;
}
preg_match("/[\\s]?(?P<element>[^\\s]+)\\s+(?P<contenu>[^#\n]*)/i", $ligne, $matches);
if (!isset($matches['contenu'])) {
//echo "Pas de match pour $ligne <br>";
continue;
} else {
//printf ("Élément: %s Contenu: %s <br>",$matches['element'],$matches['contenu']);
}
switch ($matches['element']) {
case 'NAME':
$this->tag->setDefault('mf_layer_name', trim($matches['contenu'], "'\"\n\r"));
$this->tag->setDefault('fiche_csw_id', trim($matches['contenu'], "'\"\n\r"));
$catalogue = IgoCatalogueCsw::findFirst();
$this->tag->setDefault('catalogue_csw_id', $catalogue->id);
$igoClasseEntite = IgoClasseEntite::findFirst("nom='" . trim($matches['contenu'], "'\"\n\r") . "'");
if ($igoClasseEntite) {
$this->tag->setDefault('classe_entite_id', $igoClasseEntite->id);
}
break;
case 'TYPE':
$igoGeometrieType = IgoGeometrieType::findFirst("layer_type='" . trim($matches['contenu'], "\n\r") . "'");
if ($igoGeometrieType) {
$this->tag->setDefault('geometrie_type_id', $igoGeometrieType->id);
}
break;
case 'GROUP':
$this->tag->setDefault('mf_layer_group', trim($matches['contenu'], "'\"\n\r"));
break;
case 'CONNECTIONTYPE':
//TODO aller chercher la connection
$igoConnexionType = IgoConnexionType::findFirst("nom='" . trim($matches['contenu'], "\n\r") . "'");
if ($igoConnexionType) {
$this->tag->setDefault('connexion_type_id', $igoConnexionType->id);
}
break;
case 'CONNECTION':
$this->tag->setDefault('connexion', trim($matches['contenu'], "'\"\n\r"));
// TODO bypasser l'erreur de phql
$where = "connexion like '" . trim(str_replace("'", "_", trim($matches['contenu'], "'\"\n\r"))) . "'";
$igoConnexion = IgoConnexion::findFirst($where);
//var_dump($where);
if ($igoConnexion) {
$this->tag->setDefault('connexion_id', $igoConnexion->id);
}
break;
case 'DATA':
$this->tag->setDefault('mf_layer_data', trim($matches['contenu'], "'\"\n\r"));
break;
case 'MINSCALE':
$this->tag->setDefault('mf_layer_minscale_denom', trim($matches['contenu'], "'\"\n\r"));
break;
case 'MAXSCALE':
$this->tag->setDefault('mf_layer_maxscale_denom', trim($matches['contenu'], "'\"\n\r"));
break;
case 'LABELMINSCALE':
$this->tag->setDefault('mf_layer_labelminscale_denom', trim($matches['contenu'], "'\"\n\r"));
break;
case 'LABELMAXSCALE':
$this->tag->setDefault('mf_layer_labelmaxscale_denom', trim($matches['contenu'], "'\"\n\r"));
break;
case 'OPACITY':
$this->tag->setDefault('mf_layer_opacity', trim($matches['contenu'], "'\"\n\r"));
break;
case 'FILTER':
$this->tag->setDefault('mf_layer_filter', trim($matches['contenu'], "'\"\n\r"));
break;
case '"wms_group_title"':
$this->tag->setDefault('wms_group_title', trim($matches['contenu'], "'\"\n\r"));
break;
case '"wms_name"':
$this->tag->setDefault('wms_name', trim($matches['contenu'], "'\"\n\r"));
break;
case '"wms_title"':
$this->tag->setDefault('wms_title', trim($matches['contenu'], "'\"\n\r"));
break;
case '"z_order"':
$this->tag->setDefault('z_order', trim($matches['contenu'], "'\"\n\r"));
break;
//.........这里部分代码省略.........