28 $q =
"SELECT DISTINCT(a.value) FROM il_bibl_data AS d 29 JOIN il_bibl_entry AS e ON e.data_id = d.id 30 JOIN il_bibl_attribute AS a on a.entry_id = e.id 31 WHERE a.name = %s AND d.id = %s";
33 $res = $DIC->database()->queryF($q, [
'text',
'integer' ], [
38 while (
$data = $DIC->database()->fetchObject(
$res)) {
64 $type_id = $this->field_factory->getType()->getId();
66 foreach ($attributes as $attribute) {
67 if (!$attribute->getName()) {
70 $field = $this->field_factory->findOrCreateFieldByTypeAndIdentifier($type_id, $attribute->getName());
71 $position = (int) $field->getPosition();
72 $position = $position ? $position : $max + 1;
74 $max = ($position > $max ? $position : $max);
75 $sorted[$position] = $attribute;
90 $ilBiblAttribute->setName(
$name);
91 $ilBiblAttribute->setValue($value);
92 $ilBiblAttribute->setEntryId($entry_id);
93 $ilBiblAttribute->store();
95 $this->field_factory->findOrCreateFieldOfAttribute($ilBiblAttribute);
createAttribute($name, $value, $entry_id)
Interface ilBiblEntryInterface.
getPossibleValuesForFieldAndObject(ilBiblFieldInterface $field, $object_id)
static where($where, $operator=null)
foreach($_POST as $key=> $value) $res
Interface ilBiblFieldFactoryInterface.
if(array_key_exists('yes', $_REQUEST)) $attributes
Class ilBiblAttributeFactory.
Interface ilBiblAttributeFactoryInterface.
getAttributesForEntry(ilBiblEntryInterface $entry)
Interface ilBiblEntryInterface.
__construct(ilBiblFieldFactoryInterface $field_factory)
sortAttributes(array $attributes)