noalyss Version-9
html_tab.class.php
Go to the documentation of this file.
1<?php
2
3/*
4 * Copyright (C) 2018 Dany De Bontridder <dany@alchimerys.be>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file
23 * @brief Tab element
24 *
25 */
26
27/**
28 * Tab Element
29 * @see Output_Html_Tab
30 */
32{
33 private $id; //<! DOM ID of the tabs (used for the tab and the DIV)
34 private $title; //!< Title of the tab
35 private $content ; //!< static content of the tab
36 private $mode ; //!< possible values are static if the content is static, ajax for calling an ajax, link for a html link, default static
37 private $link; //!< the javascript or an html link, depending of the $mode
38 private $comment; //!< comment to add when we use the row
39 /**
40 *@example html_tab.test.php
41 */
42 function __construct($p_id,$p_title)
43 {
44 $this->id=$p_id;
45 $this->title=$p_title;
46 $this->mode='static';
47 $this->comment="";
48 }
49
50 /**
51 * @return string
52 */
53 public function get_comment()
54 {
55 return $this->comment;
56 return $this;
57 }
58
59 /**
60 * @param string $comment
61 */
62 public function set_comment($comment)
63 {
64 $this->comment = $comment;
65 return $this;
66 }
67
68 public function get_id()
69 {
70 return $this->id;
71 }
72
73 public function get_title()
74 {
75 return $this->title;
76 }
77
78 public function get_content()
79 {
80 return $this->content;
81 }
82
83 public function set_id($id)
84 {
85 $this->id=$id;
86 return $this;
87 }
88
89 public function set_title($title)
90 {
91 $this->title=$title;
92 return $this;
93 }
94
95 public function set_content($content)
96 {
97 $this->content=$content;
98 return $this;
99 }
100 public function get_link()
101 {
102 return $this->link;
103 }
104
105 public function set_link($link)
106 {
107 $this->link=$link;
108 return $this;
109 }
110
111 public function get_mode()
112 {
113 return $this->mode;
114 }
115
116 public function set_mode($mode)
117 {
118 if ( $mode != 'static' && $mode != 'ajax' && $mode != 'link') {
119 throw new Exception(_("Mode invalide"));
120 }
121 $this->mode=$mode;
122 return $this;
123 }
124
125}
else $card content[$j]['j_montant']
Tab Element.
set_mode($mode)
set_content($content)
set_title($title)
$mode
possible values are static if the content is static, ajax for calling an ajax, link for a html link,...
$comment
comment to add when we use the row
$title
Title of the tab.
set_comment($comment)
$content
static content of the tab
$link
the javascript or an html link, depending of the $mode
set_link($link)
__construct($p_id, $p_title)
$anc_filter title