25 use ilBibliographicSecureString;
40 $this->db =
$DIC->database();
52 $parsed_attributes = [];
54 $value = $this->secure($attribute->getValue());
57 $value = preg_replace(
'!(http)(s)?:\/\/[a-zA-Z0-9.?&_/\-~\!\'\*()+,:;@=$#\[\]%]+!',
"<a href=\"\\0\" target=\"_blank\">\\0</a>", $value);
61 $attribute->setValue($value);
62 $parsed_attributes[strtolower($this->file_type->getStringRepresentation() .
'_' .
$type .
'_' . $attribute->getName())] = $value;
64 $this->field_factory->findOrCreateFieldOfAttribute($attribute);
67 return $parsed_attributes;
86 $inst = $this->
createEntry($bibliographic_obj_id, $entry_type);
89 $inst->setEntryType($entry_type);
102 $inst->setEntryType($entry_type);
126 foreach ($entries as
$entry_id => $entry) {
130 return $entry_objects;
138 $types = [
"integer"];
139 $values = [$object_id];
141 $filters =
$info->getFilters();
142 if (!empty($filters)) {
143 $q =
"SELECT (e.id), e.type FROM il_bibl_entry AS e WHERE data_id = %s";
144 foreach ($filters as $filter) {
145 $value = $filter->getFieldValue();
149 if ($filter->getOperator() ===
"IN" && is_array($filter->getFieldValue())) {
151 $values[] = $filter->getFieldName();
152 $q .=
" AND e.id IN (SELECT a.entry_id FROM il_bibl_attribute AS a WHERE a.name = %s AND " . $this->db->in(
"a.value", $value,
false,
"text") .
")";
155 $values[] = $filter->getFieldName();
157 $values[] =
"{$value}";
158 $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 )";
162 $q =
"SELECT DISTINCT (e.id), e.type FROM il_bibl_entry AS e
163 JOIN il_bibl_attribute AS a ON a.entry_id = e.id
167 $set = $this->db->queryF(
$q, $types, $values);
170 while ($rec = $this->db->fetchAssoc($set)) {
171 $entries[$i][
'entry_id'] = $rec[
'id'];
172 $entries[$i][
'entry_type'] = $rec[
'type'];
189 $this->db->manipulateF(
"DELETE FROM il_bibl_entry WHERE data_id = %s", [
'integer'], [$object_id]);
202 return $this->file_type;
207 $this->file_type = $file_type;
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static where($where, $operator=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAllAttributesByEntryId(int $id)
deleteEntriesById(int $object_id)
createEntry(int $bibliographic_obj_id, string $entry_type)
@inheritDoc
int $bibliographic_obj_id
filterEntryIdsForTableAsArray(int $object_id, ?ilBiblTableQueryInfo $info=null)
@inheritDoc
filterEntriesForTable(int $object_id, ?ilBiblTableQueryInfo $info=null)
setAttributes(array $attributes)
findOrCreateEntry(int $id, int $bibliographic_obj_id, string $entry_type)
@inheritDoc
loadParsedAttributesByEntryId(int $entry_id)
@inheritDoc
findByIdAndTypeString(int $id, string $type_string)
@inheritDoc
setFileType(string $file_type)
__construct(protected \ilBiblFieldFactoryInterface $field_factory, protected \ilBiblTypeInterface $file_type, protected \ilBiblOverviewModelFactoryInterface $overview_factory)
ilBiblEntryFactory constructor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilBiblEntryFactoryInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...