21 =
"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 = " 22 .
$ilDB->quote($this->
getId(),
'integer') .
") ";
23 $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 " 24 .
$ilDB->quote(
"%$filter_value%",
'text') .
") ";
27 $sql_obj->setJoinStatement($join_str);
42 return parent::getRecordQuerySortObject($direction, $sort_by_status);
54 if ($has_url_property) {
56 'link' => $form->
getInput(
"field_" . $this->getId()),
57 'title' => $form->
getInput(
"field_" . $this->getId() .
"_title"),
61 parent::checkValidityFromForm($form, $record_id);
72 if ($has_url_property) {
85 foreach (
$table->getRecords() as $record) {
87 $record_value = $record->getRecordFieldValue($this->
getId());
90 && ($record->getId() != $record_id
110 if (!is_array($value)) {
111 $value = array(
'link' => $value,
'title' =>
'');
115 if (!$value[
'link']) {
122 $link = (substr($value[
'link'], 0, 3) ===
'www') ?
'http://' . $value[
'link'] : $value[
'link'];
123 if (!filter_var($link, FILTER_VALIDATE_URL) && !filter_var($link, FILTER_VALIDATE_EMAIL) && $link !=
'') {
129 foreach (
$table->getRecords() as $record) {
130 $record_value = $record->getRecordFieldValue($this->
getId());
132 if ($record_value == $value
133 && ($record->getId() != $record_id
155 $inputObj->setAlert(
$lng->txt(
"form_msg_value_too_high"));
180 if (substr($regex, 0, 1) !=
"/") {
181 $regex =
"/" . $regex;
183 if (substr($regex, -1) !=
"/") {
195 $preg_match = preg_match($regex, $value);
200 if ($preg_match ==
false) {
213 public function strlen($value, $encoding =
'UTF-8')
216 case function_exists(
'mb_strlen'):
217 return mb_strlen($value, $encoding);
218 case function_exists(
'iconv_strlen'):
219 return iconv_strlen($value, $encoding);
228 parent::fillHeaderExcel($worksheet,
$row, $col);
242 foreach ($titles as $k =>
$title) {
247 $import_fields[$k] = $this;
249 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)
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.