ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilDclFormulaFieldRepresentation.php
Go to the documentation of this file.
1<?php
2
10{
11 public function getInputField(ilPropertyFormGUI $form, $record_id = 0)
12 {
13 $input = new ilTextInputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId());
14 $input->setDisabled(true);
15 $input->setValue('-');
16 $input->setInfo($this->getField()->getDescription() . '<br>' . $this->lng->txt('dcl_formula_detail_desc'));
17
18
19 return $input;
20 }
21
22
26 protected function buildFieldCreationInput(ilObjDataCollection $dcl, $mode = 'create')
27 {
28 $opt = parent::buildFieldCreationInput($dcl, $mode);
29
30 $table = ilDclCache::getTableCache((int) $_GET['table_id']);
31 $fields = array();
32 foreach ($table->getFieldsForFormula() as $f) {
33 $placeholder = ($f->isStandardField()) ? $f->getId() : $f->getTitle();
34 $fields[] = '<a class="dclPropExpressionField" data-placeholder="' . $placeholder . '">' . $f->getTitle() . '</a>';
35 }
36 $subitem = new ilTextAreaInputGUI($this->lng->txt('dcl_prop_expression'), 'prop_' . ilDclBaseFieldModel::PROP_FORMULA_EXPRESSION);
37 $operators = implode(', ', array_keys(ilDclExpressionParser::getOperators()));
38 $functions = implode(', ', ilDclExpressionParser::getFunctions());
39 $subitem->setInfo(sprintf($this->lng->txt('dcl_prop_expression_info'), $operators, $functions, implode('<br>', $fields)));
40 $opt->addSubItem($subitem);
41
42 return $opt;
43 }
44}
sprintf('%.4f', $callTime)
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
Class ilDclBaseFieldRepresentation.
static getTableCache($table_id=0)
getInputField(ilPropertyFormGUI $form, $record_id=0)
Returns field-input.
buildFieldCreationInput(ilObjDataCollection $dcl, $mode='create')
@inheritDoc
Class ilObjDataCollection.
This class represents a property form user interface.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getDescription()
Definition: Php.php:51
if(empty($password)) $table
Definition: pwgen.php:24
if(isset($_POST['submit'])) $form