28 $q =
"SELECT DISTINCT(a.value) FROM il_bibl_data AS d
29JOIN il_bibl_entry AS e ON e.data_id = d.id
30JOIN il_bibl_attribute AS a on a.entry_id = e.id
31WHERE a.name = %s AND d.id = %s";
33 $res =
$DIC->database()->queryF($q, [
'text',
'integer' ], [
64 $type_id = $this->field_factory->getType()->getId();
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);
static where($where, $operator=null)
An exception for terminatinating execution or to throw for unit testing.
Class ilBiblAttributeFactory.
getAttributesForEntry(ilBiblEntryInterface $entry)
@inheritDoc
createAttribute($name, $value, $entry_id)
@inheritDoc
__construct(ilBiblFieldFactoryInterface $field_factory)
getPossibleValuesForFieldAndObject(ilBiblFieldInterface $field, $object_id)
@inheritDoc
if(array_key_exists('yes', $_REQUEST)) $attributes
Interface ilBiblAttributeFactoryInterface.
sortAttributes(array $attributes)
Interface ilBiblEntryInterface.
Interface ilBiblFieldFactoryInterface.
Interface ilBiblEntryInterface.
foreach($_POST as $key=> $value) $res