ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSimpleConfirmationGUI Class Reference

Confirmation screen class. More...

+ Collaboration diagram for ilSimpleConfirmationGUI:

Public Member Functions

 __construct ()
 Constructor.
 setFormAction ($a_form_action)
 getFormAction ()
 setHeaderText ($a_headertext)
 Set Set header text.
 getHeaderText ()
 Get Set header text.
 addButton ($a_txt, $a_cmd)
 Set cancel button command and text.
 setCancel ($a_txt, $a_cmd)
 Set cancel button command and text.
 setConfirm ($a_txt, $a_cmd)
 Set confirmation button command and text.
 getHTML ()
 Get confirmation screen HTML.

Private Attributes

 $buttons = array()

Detailed Description

Confirmation screen class.

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..eu
Version
Id:
class.ilSimpleConfirmationGUI.php 23078 2010-02-26 19:10:12Z hschottm

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

Constructor & Destructor Documentation

ilSimpleConfirmationGUI::__construct ( )

Constructor.

Definition at line 42 of file class.ilSimpleConfirmationGUI.php.

{
}

Member Function Documentation

ilSimpleConfirmationGUI::addButton (   $a_txt,
  $a_cmd 
)
final

Set cancel button command and text.

Parameters
stringcancel text
stringcancel command

Definition at line 82 of file class.ilSimpleConfirmationGUI.php.

{
$this->buttons[] = array(
"txt" => $a_txt, "cmd" => $a_cmd);
}
ilSimpleConfirmationGUI::getFormAction ( )
final

Definition at line 51 of file class.ilSimpleConfirmationGUI.php.

Referenced by getHTML().

{
return $this->form_action;
}

+ Here is the caller graph for this function:

ilSimpleConfirmationGUI::getHeaderText ( )

Get Set header text.

Returns
string Set header text

Definition at line 71 of file class.ilSimpleConfirmationGUI.php.

Referenced by getHTML().

{
return $this->headertext;
}

+ Here is the caller graph for this function:

ilSimpleConfirmationGUI::getHTML ( )

Get confirmation screen HTML.

Returns
string HTML code.

Definition at line 117 of file class.ilSimpleConfirmationGUI.php.

References $lng, getFormAction(), getHeaderText(), and ilUtil\sendQuestion().

{
global $lng;
$template = new ilTemplate("tpl.confirmation.simple.html", TRUE, TRUE, "Services/Utilities");
if (strlen($this->confirm_cmd))
{
$template->setCurrentBlock('cmd');
$template->setVariable('CMD', $this->confirm_cmd);
$template->setVariable('TXT_CMD', $this->confirm_txt);
$template->parseCurrentBlock();
}
if (strlen($this->cancel_cmd))
{
$template->setCurrentBlock('cmd');
$template->setVariable('CMD', $this->cancel_cmd);
$template->setVariable('TXT_CMD', $this->cancel_txt);
$template->parseCurrentBlock();
}
// add buttons
foreach ($this->buttons as $b)
{
$template->setCurrentBlock('cmd');
$template->setVariable('CMD', $b['cmd']);
$template->setVariable('TXT_CMD', $b['txt']);
$template->parseCurrentBlock();
}
$template->setVariable("FORMACTION", $this->getFormAction());
return $template->get();
}

+ Here is the call graph for this function:

ilSimpleConfirmationGUI::setCancel (   $a_txt,
  $a_cmd 
)
final

Set cancel button command and text.

Parameters
stringcancel text
stringcancel command

Definition at line 94 of file class.ilSimpleConfirmationGUI.php.

{
$this->cancel_txt = $a_txt;
$this->cancel_cmd = $a_cmd;
}
ilSimpleConfirmationGUI::setConfirm (   $a_txt,
  $a_cmd 
)
final

Set confirmation button command and text.

Parameters
stringconfirmation button text
stringconfirmation button command

Definition at line 106 of file class.ilSimpleConfirmationGUI.php.

{
$this->confirm_txt = $a_txt;
$this->confirm_cmd = $a_cmd;
}
ilSimpleConfirmationGUI::setFormAction (   $a_form_action)
final

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

{
$this->form_action = $a_form_action;
}
ilSimpleConfirmationGUI::setHeaderText (   $a_headertext)

Set Set header text.

Parameters
string$a_headertextSet header text

Definition at line 61 of file class.ilSimpleConfirmationGUI.php.

{
$this->headertext = $a_headertext;
}

Field Documentation

ilSimpleConfirmationGUI::$buttons = array()
private

Definition at line 36 of file class.ilSimpleConfirmationGUI.php.


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