Commit 14a0389c authored by Tibor Katelbach's avatar Tibor Katelbach
Browse files

tweaks

parent 1dbfbec0
<?php
/**
* Api Module
*
* @author Tibor Katelbach <oceatoon@mail.com>
* @version 0.0.3
*
*/
class ApiModule extends CWebModule
{
private $_version = "v0.1.0";
private $_versionDate = "20/09/2019";
private $_keywords = "module,opensource,CO,communecter,api";
private $_description = "oPEN Data an open systems";
private $_pageTitle = "CO api";
public function getVersion(){return $this->_version;}
public function getVersionDate(){return $this->_versionDate;}
public function getKeywords(){return $this->_keywords;}
public function getDescription(){return $this->_description;}
public function getPageTitle(){return $this->_pageTitle;}
public function init()
{
// this method is called when the module is being created
......@@ -25,17 +34,29 @@ class ApiModule extends CWebModule
Yii::app()->language = (isset(Yii::app()->session["lang"])) ? Yii::app()->session["lang"] : 'fr';
// import the module-level models and components
Yii::app()->params["module"] = array(
"name" => self::getPageTitle(),
"parent" => "co2",
"costumId"=>"",
"overwrite" => array(
"views" => array(),
"assets" => array(),
"controllers" => array(),
));
// import the module-level models and components
$this->setImport(array(
'citizenToolKit.models.*',
'eco.models.*',
'places.models.*',
'map.models.*',
'news.models.*',
'dda.models.*',
'costum.models.*',
'interop.models.*',
'survey.models.*',
Yii::app()->params["module"]["parent"].'.models.*',
Yii::app()->params["module"]["parent"].'.components.*',
$this->id.'.models.*',
$this->id.'.components.*',
$this->id.'.messages.*',
$this->id.'.messages.*'
));
}
......
<?php
/**
* CtenatController.php
*
* CtenatController SPECIFIC api calls
*
*/
class CtenatController extends CommunecterController {
protected function beforeAction($action) {
//parent::initPage();
//return parent::beforeAction($action);
}
public function actions()
{
return array(
'cter' => 'api.controllers.ctenat.CterAction'
);
}
}
<?php
class CterAction extends CAction{
public function run($slug = null) {
//$controller=$this->getController();
echo "bobo";
echo "cococo";
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment