52 if ($this->type->isStandardField($inst->getIdentifier()) !== $inst->isStandardField()) {
53 $inst->setIsStandardField($this->type->isStandardField($inst->getIdentifier()));
68 throw new ilException(
"bibliografic identifier {$identifier} not found");
84 $inst->setIdentifier($identifier);
85 $inst->setDataType($type);
86 $inst->setIsStandardField($this->
getType()->isStandardField($identifier));
89 $inst->setDataType($type);
90 $inst->setIdentifier($identifier);
91 $inst->setIsStandardField($this->
getType()->isStandardField($identifier));
105 =
"SELECT DISTINCT(il_bibl_attribute.name), il_bibl_data.file_type FROM il_bibl_data 106 JOIN il_bibl_entry ON il_bibl_entry.data_id = il_bibl_data.id 107 JOIN il_bibl_attribute ON il_bibl_attribute.entry_id = il_bibl_entry.id 108 WHERE il_bibl_data.id = %s;";
110 $result = $DIC->database()->queryF($sql, [
'integer'], [$obj_id]);
113 while (
$d = $DIC->database()->fetchObject($result)) {
145 if ($field ===
null) {
147 $field->setIdentifier($attribute->
getName());
148 $field->setDataType($this->type->getId());
149 $field->setIsStandardField($this->type->isStandardField($attribute->
getName()));
152 $field->setDataType($this->type->getId());
167 $q =
"UPDATE {$tablename} SET position = position + 1 WHERE data_type = %s AND position >= %s;";
168 $DIC->database()->manipulateF(
170 [
'integer',
'integer'],
177 $DIC->database()->query(
"SET @i=0");
178 $DIC->database()->manipulateF(
179 "UPDATE {$tablename} SET position = (@i := @i + 1) WHERE data_type = %s ORDER BY position",
201 $q =
"SELECT MAX(position) + 1 as next_position FROM {$tablename} WHERE data_type = %s;";
203 $data = $DIC->database()->fetchObject(
$res);
205 return (
int)
$data->next_position;
211 return ilBiblField::where([
"identifier" => $identifier,
"data_type" => $type])->first();
219 $collection->where([
'data_type' => $type->
getId()]);
221 if ($queryInfo !==
null) {
222 $sorting_column = $queryInfo->getSortingColumn() !==
'' && $queryInfo->getSortingColumn() !==
'0' ? $queryInfo->getSortingColumn() :
null;
223 $offset = $queryInfo->getOffset();
224 $sorting_direction = $queryInfo->getSortingDirection();
225 $limit = $queryInfo->getLimit();
226 if ($sorting_column) {
227 $collection->orderBy($sorting_column, $sorting_direction);
229 $collection->limit($offset, $limit);
231 foreach ($queryInfo->getFilters() as $queryFilter) {
232 $collection->where([$queryFilter->getFieldName() => $queryFilter->getFieldValue()], $queryFilter->getOperator());
filterAllFieldsForType(ilBiblTypeInterface $type, ?ilBiblTableQueryInfoInterface $queryInfo=null)
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...
getCollectionForFilter(ilBiblTypeInterface $type, ?ilBiblTableQueryInfoInterface $queryInfo=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static findOrFail($primary_key, array $add_constructor_args=[])
Tries to find the object and throws an Exception if object is not found, instead of returning null...
forcePosition(ilBiblFieldInterface $field)
static where($where, $operator=null)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getFieldByTypeAndIdentifier(int $type, string $identifier)
MUST be ilBiblTypeFactoryInterface::DATA_TYPE_RIS or ilBiblTypeFactoryInterface::DATA_TYPE_BIBTEX ...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(protected \ilBiblTypeInterface $type)
ilBiblFieldFactory constructor.
getAvailableFieldsForObjId(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getNextFreePosition(ilBiblFieldInterface $field)
findOrCreateFieldOfAttribute(ilBiblAttributeInterface $attribute)
filterAllFieldsForTypeAsArray(ilBiblTypeInterface $type, ?ilBiblTableQueryInfoInterface $queryInfo=null)
findOrCreateFieldByTypeAndIdentifier(int $type, string $identifier)
MUST be ilBiblTypeFactoryInterface::DATA_TYPE_RIS or ilBiblTypeFactoryInterface::DATA_TYPE_BIBTEX ...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getARInstance(int $type, string $identifier)
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...