20 $join_str =
"INNER JOIN il_dcl_record_field AS filter_record_field_{$this->getId()} ON (filter_record_field_{$this->getId()}.record_id = record.id AND filter_record_field_{$this->getId()}.field_id = " 21 .
$ilDB->quote($this->
getId(),
'integer') .
") ";
22 $join_str .=
"INNER JOIN il_dcl_stloc{$this->getStorageLocation()}_value AS filter_stloc_{$this->getId()} ON (filter_stloc_{$this->getId()}.record_field_id = filter_record_field_{$this->getId()}.id AND filter_stloc_{$this->getId()}.value LIKE " 23 .
$ilDB->quote(
"%$filter_value%",
'text') .
") ";
26 $sql_obj->setJoinStatement($join_str);
40 return parent::getRecordQuerySortObject($direction, $sort_by_status);
52 if ($has_url_property) {
54 'link' => $form->
getInput(
"field_" . $this->getId()),
55 'title' => $form->
getInput(
"field_" . $this->getId() .
"_title")
59 parent::checkValidityFromForm($form, $record_id);
70 if ($has_url_property) {
83 foreach (
$table->getRecords() as $record) {
85 $record_value = $record->getRecordFieldValue($this->
getId());
88 && ($record->getId() != $record_id
108 if (!is_array($value)) {
109 $value =
array(
'link' => $value,
'title' =>
'');
113 if (!$value[
'link']) {
120 $link = (substr($value[
'link'], 0, 3) ===
'www') ?
'http://' . $value[
'link'] : $value[
'link'];
121 if (!filter_var($link, FILTER_VALIDATE_URL) && !filter_var($link, FILTER_VALIDATE_EMAIL) && $link !=
'') {
127 foreach (
$table->getRecords() as $record) {
128 $record_value = $record->getRecordFieldValue($this->
getId());
130 if ($record_value == $value
131 && ($record->getId() != $record_id
152 $inputObj->setAlert(
$lng->txt(
"form_msg_value_too_high"));
177 if (substr($regex, 0, 1) !=
"/") {
178 $regex =
"/" . $regex;
180 if (substr($regex, -1) !=
"/") {
192 $preg_match = preg_match($regex, $value);
197 if ($preg_match ==
false) {
209 public function strlen($value, $encoding =
'UTF-8')
212 case function_exists(
'mb_strlen'):
213 return mb_strlen($value, $encoding);
214 case function_exists(
'iconv_strlen'):
215 return iconv_strlen($value, $encoding);
223 parent::fillHeaderExcel($worksheet,
$row, $col);
236 foreach ($titles as $k =>
$title) {
241 $import_fields[$k] = $this;
243 unset($titles[$k+1]);
getValidFieldProperties()
Class ilDclBaseFieldModel.
checkRegexAndLength($value)
fillHeaderExcel(ilExcel $worksheet, &$row, &$col)
checkValidity($value, $record_id=null)
checkTitlesForImport(array &$titles, array &$import_fields)
Class ilDclRecordQueryObject.
checkFieldCreationInput(ilPropertyFormGUI $form)
checkValidityFromForm(ilPropertyFormGUI &$form, $record_id=null)
static getTableCache($table_id=0)
getTableId()
Get table id.
const PROP_LINK_DETAIL_PAGE_TEXT
if(isset($_POST['submit'])) $form
hasProperty($key)
Checks if a certain property for a field is set.
const PROP_LENGTH
General properties.
setCell($a_row, $a_col, $a_value, $a_datatype=null)
Set cell value.
getRecordQueryFilterObject($filter_value="", ilDclBaseFieldModel $sort_field=null)
Create styles array
The data for the language used.
getProperty($key)
Returns a certain property of a field.
checkValidityOfURLField($value, $record_id)
strlen($value, $encoding='UTF-8')
Class ilDclTextRecordQueryObject.
if(empty($password)) $table
getRecordQuerySortObject($direction="asc", $sort_by_status=false)
Class ilDclTextFieldModel.
static isUtf8($a_str)
Check whether string is utf-8.