noalyss Version-9
Public Member Functions | Protected Attributes | Private Attributes
Tag Class Reference

Tag operations or actions to linked them together. More...

+ Inheritance diagram for Tag:
+ Collaboration diagram for Tag:

Public Member Functions

 __construct ($p_cn, $id=-1)
 
 form_add ()
 Display a inner window with the detail of a tag. More...
 
 get_data ()
 
 query_active_tag ()
 
 remove ($p_array)
 
 save ($p_array)
 
 set_data ($data)
 
 show_form_add ()
 Show the tag you can add to a document. More...
 
 show_list ()
 Show the list of available tag. More...
 

Protected Attributes

 $cn
 

Private Attributes

 $data
 

Detailed Description

Tag operations or actions to linked them together.

Definition at line 31 of file tag.class.php.

Constructor & Destructor Documentation

◆ __construct()

Tag::__construct (   $p_cn,
  $id = -1 
)

Reimplemented in Tag_Action, and Tag_Operation.

Definition at line 35 of file tag.class.php.

36 {
37 $this->cn=$p_cn;
38 $id = (trim($id)=="")?-1:$id;
39 $this->data=new Tag_SQL($p_cn,$id);
40 }
$input_from cn
Definition: balance.inc.php:66
Manage the table public.tag.

References $id, and cn.

Member Function Documentation

◆ form_add()

Tag::form_add ( )

Display a inner window with the detail of a tag.

Definition at line 66 of file tag.class.php.

67 {
69 require_once NOALYSS_TEMPLATE.'/tag_detail.php';
70 }
$data
Definition: tag.class.php:33

References $data.

Referenced by show_form_add().

◆ get_data()

Tag::get_data ( )

Definition at line 41 of file tag.class.php.

42 {
43 return $this->data;
44 }

References $data.

◆ query_active_tag()

Tag::query_active_tag ( )

Definition at line 98 of file tag.class.php.

99 {
100 $ret=$this->cn->exec_sql(" select t_id,t_tag,t_description,'t' as tag_type ,t_color
101 from tags
102 where t_actif='Y'
103 union all
104 select tg_id,tg_name ,'G','g' ,1 from tag_group order by 2");
105 return $ret;
106 }

References $ret, and cn.

◆ remove()

Tag::remove (   $p_array)

Definition at line 90 of file tag.class.php.

91 {
92 $this->data->t_id=$p_array['t_id'];
93 $this->data->delete();
94 }

References $p_array.

◆ save()

Tag::save (   $p_array)

Definition at line 80 of file tag.class.php.

81 {
82 if ( trim($p_array['t_tag'])=="" ) return ;
83 $this->data->t_id=$p_array['t_id'];
84 $this->data->t_tag= strip_tags($p_array['t_tag']);
85 $this->data->t_description=strip_tags($p_array['t_description']);
86 $this->data->t_actif=$p_array['t_actif'];
87 $this->data->t_color=$p_array['tagcell_color'];
88 $this->data->save();
89 }

References $p_array, and return.

◆ set_data()

Tag::set_data (   $data)

Definition at line 46 of file tag.class.php.

47 {
48 $this->data=$data;
49 return $this;
50 }

References $data.

◆ show_form_add()

Tag::show_form_add ( )

Show the tag you can add to a document.

Definition at line 74 of file tag.class.php.

75 {
76 echo h2(_("Ajout d'un dossier (ou tag)"));
77
78 $this->form_add();
79 }
h2($p_string, $p_class="", $raw="")
Definition: ac_common.php:68
form_add()
Display a inner window with the detail of a tag.
Definition: tag.class.php:66

References form_add(), and h2().

+ Here is the call graph for this function:

◆ show_list()

Tag::show_list ( )

Show the list of available tag.

Returns
HTML

Definition at line 56 of file tag.class.php.

57 {
58 $ret=$this->data->seek(' order by t_tag');
59 if ( $this->cn->count($ret) == 0) return "";
60 require_once NOALYSS_TEMPLATE.'/tag_list.php';
61 }

References $ret, and cn.

Field Documentation

◆ $cn

Tag::$cn
protected

Definition at line 34 of file tag.class.php.

◆ $data

Tag::$data
private

Definition at line 33 of file tag.class.php.

Referenced by form_add(), get_data(), and set_data().


The documentation for this class was generated from the following file: