Platform
3.1
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
generic_chooseenumattr.php
Go to the documentation of this file.
1
<?php
2
/*
3
* @author Anakeen
4
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5
* @package FDL
6
*/
7
/**
8
* Display list of enumrate attribute for a family
9
*
10
* @author Anakeen 2006
11
* @version $Id: generic_chooseenumattr.php,v 1.3 2008/12/11 10:06:52 eric Exp $
12
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13
* @package FDL
14
* @subpackage
15
*/
16
/**
17
*/
18
19
include_once (
"FDL/Class.Doc.php"
);
20
include_once (
"GENERIC/generic_util.php"
);
21
/**
22
* Display list of enumrate attribute for a family
23
* @param Action &$action current action
24
* @global famid Http var : family document identificator where find enum attributes
25
*/
26
function
generic_chooseenumattr
(&
$action
)
27
{
28
$famid
=
GetHttpVars
(
"famid"
,
getDefFam
(
$action
));
29
$action
->lay->set(
"famid"
,
$famid
);
30
$dbaccess
=
$action
->GetParam(
"FREEDOM_DB"
);
31
$action
->parent->AddJsRef(
$action
->GetParam(
"CORE_JSURL"
) .
"/subwindow.js"
);
32
33
$tcf = array();
34
35
$fdoc
= new_doc(
$dbaccess
,
$famid
);
36
37
$lattr
=
$fdoc
->getAttributes();
38
foreach
(
$lattr
as $k =>
$a
) {
39
if
(((
$a
->type ==
"enum"
) || (
$a
->type ==
"enumlist"
)) && ((
$a
->phpfile ==
""
) || (
$a
->phpfile ==
"-"
)) && (
$a
->getOption(
"system"
) !=
"yes"
)) {
40
41
$tcf[] = array(
42
"label"
=>
$a
->getLabel() ,
43
"famid"
=>
$a
->docid,
44
"ftitle"
=>
$fdoc
->getTitle(
$a
->docid) ,
45
"kindid"
=>
$a
->id
46
);
47
}
48
}
49
50
$action
->lay->setBlockData(
"CATG"
, $tcf);
51
$action
->lay->set(
"title"
, sprintf(_(
"modify enumerate attributes for family : %s"
) ,
$fdoc
->title));
52
$action
->lay->set(
"icon"
,
$fdoc
->getIcon());
53
}
54
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase