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;";
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());
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static where($where, $operator=null)
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getNextFreePosition(ilBiblFieldInterface $field)
getARInstance(int $type, string $identifier)
filterAllFieldsForTypeAsArray(ilBiblTypeInterface $type, ?ilBiblTableQueryInfoInterface $queryInfo=null)
@inheritDoc
__construct(protected \ilBiblTypeInterface $type)
ilBiblFieldFactory constructor.
filterAllFieldsForType(ilBiblTypeInterface $type, ?ilBiblTableQueryInfoInterface $queryInfo=null)
@inheritDoc
getAvailableFieldsForObjId(int $obj_id)
@inheritDoc
getFieldByTypeAndIdentifier(int $type, string $identifier)
ilException if a wrong $type is passed or field is not found
findOrCreateFieldOfAttribute(ilBiblAttributeInterface $attribute)
@inheritDoc
findOrCreateFieldByTypeAndIdentifier(int $type, string $identifier)
ilException if a wrong $type is passed
forcePosition(ilBiblFieldInterface $field)
@inheritDoc
getCollectionForFilter(ilBiblTypeInterface $type, ?ilBiblTableQueryInfoInterface $queryInfo=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Base class for ILIAS Exception handling.
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...