<?php

namespace Modules\Stock\Trait;

use Exception;

trait MenuContextuelTrait
{
    /**
     * @param array<int,array<string,mixed>> $entities
     * @return void
     * @throws Exception
     */
    public function addMenuContextuelToEntities(array &$entities): void
    {
        foreach ($entities as &$entity) {
            $entity['menuContextuel'] = $this->generate($entity);
        }
    }
}
