Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pixel Humain
api
Commits
64b21ec1
Commit
64b21ec1
authored
Sep 23, 2019
by
Raph El
Browse files
Merge branch 'master' into qa
parents
d7c573b6
14a0389c
Changes
3
Hide whitespace changes
Inline
Side-by-side
ApiModule.php
View file @
64b21ec1
<?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.*'
));
}
...
...
controllers/CtenatController.php
0 → 100644
View file @
64b21ec1
<?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'
);
}
}
controllers/ctenat/CterAction.php
0 → 100644
View file @
64b21ec1
<?php
class
CterAction
extends
CAction
{
public
function
run
(
$slug
=
null
)
{
//$controller=$this->getController();
echo
"bobo"
;
echo
"cococo"
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment