ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
arGUI Class Reference
+ Collaboration diagram for arGUI:

Public Member Functions

 __construct ($record_type, ilPlugin $plugin_object=NULL)
 executeCommand ()
 multiAction ($action_name="")
 customMultiAction ($action_name="", $ids=NULL)
 save (arEditGUI $edit_gui)
 getRecordCreatedMessage ()
 delete ($id)
 getDeleteRecordsConfirmationMessage ()
 getDeleteRecordConfirmationMessage ()
 deleteItems ()
 getDeleteRecordsMessage ()
 getDeleteRecordMessage ()
 setLngPrefix ($lng_prefix)
 getLngPrefix ()
 txt ($txt, $plugin_txt=true)

Protected Attributes

 $ctrl
 $tpl
 $access
 $lng
 ilLanguage
 $plugin_object = NULL
 $record_type = ""
 $ar
 $lng_prefix = ""

Detailed Description

Author
Timon Amstutz timon.nosp@m..ams.nosp@m.tutz@.nosp@m.ilub.nosp@m..unib.nosp@m.e.ch
Version
2.0.7

Definition at line 12 of file class.arGUI.php.

Constructor & Destructor Documentation

arGUI::__construct (   $record_type,
ilPlugin  $plugin_object = NULL 
)
Parameters
$record_type
ilPlugin$plugin_object

Definition at line 52 of file class.arGUI.php.

References $ilCtrl, $lng, $plugin_object, $record_type, $tpl, and setLngPrefix().

{
global $tpl, $ilCtrl, $ilAccess, $lng;
$this->lng = $lng;
if ($plugin_object) {
$this->setLngPrefix($plugin_object->getPrefix());
$plugin_object->loadLanguageModule();
}
$this->tpl = $tpl;
$this->ctrl = $ilCtrl;
$this->access = $ilAccess;
$this->plugin_object = $plugin_object;
$this->record_type = $record_type;
$this->ar = new $record_type();
}

+ Here is the call graph for this function:

Member Function Documentation

arGUI::customMultiAction (   $action_name = "",
  $ids = NULL 
)
Parameters
string$action_name
null$ids

Definition at line 159 of file class.arGUI.php.

Referenced by multiAction().

{
}

+ Here is the caller graph for this function:

arGUI::delete (   $id)
Parameters
$id

Definition at line 246 of file class.arGUI.php.

{
$this->deleteMultiple(array( $id ));
}
arGUI::deleteItems ( )

Definition at line 285 of file class.arGUI.php.

References $_POST, getDeleteRecordMessage(), getDeleteRecordsMessage(), and ilUtil\sendSuccess().

{
$nr_ids = $_POST['nr_ids'];
for ($i = 0; $i < $nr_ids; $i ++) {
$id = $_POST['delete_id_' . $i];
$record = $this->ar->find($id);
$record->delete();
}
if ($i == 1) {
} else {
}
$this->ctrl->redirect($this, "index");
}

+ Here is the call graph for this function:

arGUI::executeCommand ( )

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

References $_GET, $_POST, $cmd, arIndexTableGUI\domid_decode(), and multiAction().

{
$cmd = $this->ctrl->getCmd();
switch ($cmd) {
case "edit":
case "update":
case "view":
case "delete":
break;
case "multiAction":
$action_name = $_POST["index_table_multi_action_2"];
$this->multiAction($action_name);
break;
default:
$this->$cmd();
break;
}
}

+ Here is the call graph for this function:

arGUI::getDeleteRecordConfirmationMessage ( )
Returns
string

Definition at line 280 of file class.arGUI.php.

References txt().

{
return $this->txt(('delete_record_confirmation'), true);
}

+ Here is the call graph for this function:

arGUI::getDeleteRecordMessage ( )
Returns
string

Definition at line 313 of file class.arGUI.php.

References txt().

Referenced by deleteItems().

{
return $this->txt(('record_deleted'), true);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arGUI::getDeleteRecordsConfirmationMessage ( )
Returns
string

Definition at line 272 of file class.arGUI.php.

References txt().

{
return $this->txt(('delete_records_confirmation'), true);
}

+ Here is the call graph for this function:

arGUI::getDeleteRecordsMessage ( )
Returns
string

Definition at line 305 of file class.arGUI.php.

References txt().

Referenced by deleteItems().

{
return $this->txt(('records_deleted'), true);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arGUI::getLngPrefix ( )
Returns
string

Definition at line 329 of file class.arGUI.php.

References $lng_prefix.

Referenced by txt().

{
}

+ Here is the caller graph for this function:

arGUI::getRecordCreatedMessage ( )
Returns
string

Definition at line 225 of file class.arGUI.php.

References txt().

Referenced by save().

{
return $this->txt(('record_created'), true);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arGUI::multiAction (   $action_name = "")
Parameters
string$action_name

Definition at line 131 of file class.arGUI.php.

References $_POST, customMultiAction(), arIndexTableGUI\domid_decode(), ilUtil\sendFailure(), and txt().

Referenced by executeCommand().

{
$ids = array();
if ($_POST['id']) {
foreach ($_POST['id'] as $id) {
}
}
if (empty($ids)) {
ilUtil::sendFailure($this->txt("no_checkbox", false), true);
$this->ctrl->redirect($this, "index");
}
switch ($action_name) {
case "delete":
$this->deleteMultiple($ids);
break;
default:
$this->customMultiAction($action_name, $ids);
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arGUI::save ( arEditGUI  $edit_gui)
Parameters
arEditGUI$edit_gui

Definition at line 212 of file class.arGUI.php.

References ilPropertyFormGUI\getHTML(), getRecordCreatedMessage(), and ilUtil\sendSuccess().

{
if ($edit_gui->saveObject()) {
$this->ctrl->redirect($this, "index");
} else {
$this->tpl->setContent($edit_gui->getHTML());
}
}

+ Here is the call graph for this function:

arGUI::setLngPrefix (   $lng_prefix)
Parameters
string$lng_prefix

Definition at line 321 of file class.arGUI.php.

References $lng_prefix.

Referenced by __construct().

{
$this->lng_prefix = $lng_prefix;
}

+ Here is the caller graph for this function:

arGUI::txt (   $txt,
  $plugin_txt = true 
)
Parameters
$txt
bool$plugin_txt
Returns
string

Definition at line 340 of file class.arGUI.php.

References $txt, and getLngPrefix().

Referenced by getDeleteRecordConfirmationMessage(), getDeleteRecordMessage(), getDeleteRecordsConfirmationMessage(), getDeleteRecordsMessage(), getRecordCreatedMessage(), and multiAction().

{
if ($this->getLngPrefix() != "" && $plugin_txt) {
return $this->lng->txt($this->getLngPrefix() . "_" . $txt, $this->getLngPrefix());
} else {
return $this->lng->txt($txt);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

arGUI::$access
protected

Definition at line 25 of file class.arGUI.php.

arGUI::$ar
protected

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

arGUI::$ctrl
protected

Definition at line 17 of file class.arGUI.php.

arGUI::$lng
protected

ilLanguage

Definition at line 29 of file class.arGUI.php.

Referenced by __construct().

arGUI::$lng_prefix = ""
protected

Definition at line 45 of file class.arGUI.php.

Referenced by getLngPrefix(), and setLngPrefix().

arGUI::$plugin_object = NULL
protected

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

Referenced by __construct().

arGUI::$record_type = ""
protected

Definition at line 37 of file class.arGUI.php.

Referenced by __construct().

arGUI::$tpl
protected

Definition at line 21 of file class.arGUI.php.

Referenced by __construct().


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