mirror of
https://github.com/Karaka-Management/oms-ItemManagement.git
synced 2026-02-03 22:18:41 +00:00
Using direct access for notes, files, attributes.
This commit is contained in:
parent
f3e313043b
commit
928d507994
|
|
@ -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}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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'] ?? [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user