9 use Magento\TestModule2\Service\V1\Entity\ItemFactory;
31 return $this->itemFactory->create()->setId(
$id)->setName(
'testItem' .
$id);
39 $result1 = $this->itemFactory->create()->setId(1)->setName(
'testItem1');
41 $result2 = $this->itemFactory->create()->setId(2)->setName(
'testItem2');
43 return [$result1, $result2];
51 return $this->itemFactory->create()->setId(rand())->setName(
$name);
59 return $this->itemFactory->create()->setId(
$item->getId())->setName(
'Updated' .
$item->getName());
65 public function remove(
$id)
67 return $this->itemFactory->create()->setId(1);
__construct(ItemFactory $itemFactory)
if(!isset($_GET['name'])) $name