PHP code example of fsi / admin-positionable-bundle
1. Go to this page and download the library: Download fsi/admin-positionable-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fsi / admin-positionable-bundle example snippets
new FSi\Bundle\AdminPositionableBundle\FSiAdminPositionableBundle(),
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use FSi\Bundle\AdminPositionableBundle\Model\PositionableInterface;
class Promotion implements PositionableInterface
{
/**
* @Gedmo\SortablePosition
* @ORM\Column(type="integer")
*/
protected $position;
/**
* {@inheritdoc}
*/
public function increasePosition()
{
$this->position++;
}
/**
* {@inheritdoc}
*/
public function decreasePosition()
{
$this->position--;
}
}