.. rst-class:: outdated Installation ============ .. danger:: We're sorry but **this documentation section is outdated**. Please have that in mind when trying to use it. You can help us making documentation up to date via Sylius Github. Thank you! We assume you're familiar with `Composer `_, a dependency manager for PHP. Use the following command to add the bundle to your `composer.json` and download package. If you have `Composer installed globally `_. .. code-block:: bash composer require sylius/inventory-bundle Otherwise you have to download .phar file. .. code-block:: bash curl -sS https://getcomposer.org/installer | php php composer.phar require sylius/inventory-bundle Adding required bundles to the kernel ------------------------------------- First, you need to enable the bundle inside the kernel. If you're not using any other Sylius bundles, you will also need to add `SyliusResourceBundle` and its dependencies to the kernel. Don't worry, everything was automatically installed via Composer. .. code-block:: php onHand = 1; } public function getId() { return $this->id; } public function getIsbn() { return $this->isbn; } public function setIsbn($isbn) { $this->isbn = $isbn; } public function getSku() { return $this->getIsbn(); } public function getTitle() { return $this->title; } public function setTitle($title) { $this->title = $title; } public function getInventoryName() { return $this->getTitle(); } public function isInStock() { return 0 < $this->onHand; } public function getOnHand() { return $this->onHand; } public function setOnHand($onHand) { $this->onHand = $onHand; } } .. note:: This example shows the full power of `StockableInterface`. In order to track the books inventory our `Book` entity must implement `StockableInterface`. Note that we added ``->getSku()`` method which is alias to ``->getIsbn()``, this is the power of the interface, we now have full control over the entity mapping. In the same way ``->getInventoryName()`` exposes the book title as the displayed name for our stockable entity. The next step requires the creating of the `InventoryUnit` entity, let’s do this now. .. code-block:: php