76 $type = $ilBiblEntry->getType();
80 $parsed_attributes = array();
84 $value = preg_replace(
'!(http)(s)?:\/\/[a-zA-Z0-9.?&_/\-~\!\'\*()+,:;@=$#\[\]%]+!',
"<a href=\"\\0\" target=\"_blank\">\\0</a>", $attribute->getValue());
85 $attribute->setValue($value);
86 $parsed_attributes[strtolower($this->file_type->getStringRepresentation() .
'_' .
$type .
'_' . $attribute->getName())] = $value;
88 $this->field_factory->findOrCreateFieldOfAttribute($attribute);
91 return $parsed_attributes;
114 $inst->setEntryType($entry_type);
128 $inst->setEntryType($entry_type);
162 foreach ($entries as
$entry_id => $entry) {
166 return $entry_objects;
177 $types = [
"integer" ];
181 $filters =
$info->getFilters();
182 if (!empty($filters)) {
183 $q =
"SELECT (e.id), e.type FROM il_bibl_entry AS e WHERE data_id = %s";
184 foreach ($filters as $filter) {
185 $value = $filter->getFieldValue();
189 if ($filter->getOperator() ===
"IN" && is_array($filter->getFieldValue())) {
191 $values[] = $filter->getFieldName();
192 $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") .
")";
195 $values[] = $filter->getFieldName();
198 $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 )";
202 $q =
"SELECT DISTINCT (e.id), e.type FROM il_bibl_entry AS e 203 JOIN il_bibl_attribute AS a ON a.entry_id = e.id 208 $set = $DIC->database()->queryF($q, $types,
$values);
211 while ($rec = $DIC->database()->fetchAssoc($set)) {
212 $entries[
$i][
'entry_id'] = $rec[
'id'];
213 $entries[
$i][
'entry_type'] = $rec[
'type'];
getAllEntries($object_id)
Read all entries from the database.
if(!array_key_exists('StateId', $_REQUEST)) $id
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.
Interface ilBiblEntryInterface.