Using direct access for notes, files, attributes.

This commit is contained in:
Dennis Eichhorn 2023-06-15 01:54:35 +02:00
parent f3e313043b
commit 928d507994
3 changed files with 5 additions and 31 deletions

View File

@ -235,32 +235,6 @@ class Item implements \JsonSerializable
$this->status = $status;
}
/**
* Add note to item
*
* @param EditorDoc $note Note
*
* @return void
*
* @since 1.0.0
*/
public function addNote(EditorDoc $note) : void
{
$this->notes[] = $note;
}
/**
* Get notes
*
* @return EditorDoc[]
*
* @since 1.0.0
*/
public function getNotes() : array
{
return $this->notes;
}
/**
* {@inheritdoc}
*/

View File

@ -23,9 +23,9 @@ use phpOMS\Uri\UriFactory;
/** @var \Modules\ItemManagement\Models\Item $item */
$item = $this->data['item'];
$attribute = $item->getAttributes();
$attribute = $item->attributes;
$notes = $item->getNotes();
$notes = $item->notes;
$files = $item->files;
$itemImage = $this->getData('itemImage') ?? new NullMedia();
@ -573,7 +573,7 @@ echo $this->data['nav']->render();
<div class="tab">
<div class="row">
<?= $attributeView->render(
$item->getAttributes(),
$item->attributes,
$this->data['attributeTypes'] ?? [],
$this->data['units'] ?? [],
'{/api}item/attribute'

View File

@ -21,9 +21,9 @@ use phpOMS\Uri\UriFactory;
$item = $this->data['item'];
$itemL11n = $item->getL11ns();
$Attribute = $item->getAttributes();
$Attribute = $item->attributes;
$notes = $item->getNotes();
$notes = $item->notes;
$files = $item->files;
$newestInvoices = $this->data['newestInvoices'] ?? [];