93 $type = $ilBiblEntry->getType();
97 $parsed_attributes = array();
99 $value = $this->secure($attribute->getValue());
102 $value = preg_replace(
'!(http)(s)?:\/\/[a-zA-Z0-9.?&_/\-~\!\'\*()+,:;@=$#\[\]%]+!',
"<a href=\"\\0\" target=\"_blank\">\\0</a>", $value);
106 $attribute->setValue($value);
107 $parsed_attributes[strtolower($this->file_type->getStringRepresentation() .
'_' .
$type .
'_' . $attribute->getName())] = $value;
109 $this->field_factory->findOrCreateFieldOfAttribute($attribute);
112 return $parsed_attributes;
135 $inst->setEntryType($entry_type);
149 $inst->setEntryType($entry_type);
183 foreach ($entries as
$entry_id => $entry) {
187 return $entry_objects;
198 $types = [
"integer"];
199 $values = [$object_id];
202 $filters = $info->getFilters();
203 if (!empty($filters)) {
204 $q =
"SELECT (e.id), e.type FROM il_bibl_entry AS e WHERE data_id = %s";
205 foreach ($filters as $filter) {
206 $value = $filter->getFieldValue();
210 if ($filter->getOperator() ===
"IN" && is_array($filter->getFieldValue())) {
212 $values[] = $filter->getFieldName();
213 $q .=
" AND e.id IN (SELECT a.entry_id FROM il_bibl_attribute AS a WHERE a.name = %s AND " . $DIC->database()->in(
"a.value", $value,
false,
"text") .
")";
216 $values[] = $filter->getFieldName();
218 $values[] =
"{$value}";
219 $q .=
" AND e.id IN (SELECT a.entry_id FROM il_bibl_attribute AS a WHERE a.name = %s AND a.value {$filter->getOperator()} %s )";
223 $q =
"SELECT DISTINCT (e.id), e.type FROM il_bibl_entry AS e 224 JOIN il_bibl_attribute AS a ON a.entry_id = e.id 229 $set = $DIC->database()->queryF($q, $types, $values);
232 while ($rec = $DIC->database()->fetchAssoc($set)) {
233 $entries[
$i][
'entry_id'] = $rec[
'id'];
234 $entries[
$i][
'entry_type'] = $rec[
'type'];
getAllEntries($object_id)
Read all entries from the database.
findOrCreateEntry($id, $bibliographic_obj_id, $entry_type)
static where($where, $operator=null)
filterEntriesForTable($object_id, ilBiblTableQueryInfo $info=null)
Interface ilBiblEntryFactoryInterface.
Interface ilBiblTypeInterface.
createEntry($bibliographic_obj_id, $entry_type)
__construct(ilBiblFieldFactoryInterface $field_factory, \ilBiblTypeInterface $file_type, ilBiblOverviewModelFactoryInterface $overview_factory)
ilBiblEntryFactory constructor.
Class ilBiblEntryFactory.
loadParsedAttributesByEntryId($entry_id)
Class ilBiblTableQueryInfo.
getAllAttributesByEntryId($id)
Interface ilBiblFieldFactoryInterface.
setAttributes($attributes)
Class ilBiblOverviewModelFactoryInterface.
findByIdAndTypeString($id, $type_string)
filterEntryIdsForTableAsArray($object_id, ilBiblTableQueryInfo $info=null)
getEntryById($id)
Get entry from the database.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilBiblEntryInterface.