PHP code example of arobases / sylius-rights-management-plugin
1. Go to this page and download the library: Download arobases/sylius-rights-management-plugin 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/ */
arobases / sylius-rights-management-plugin example snippets
# config/bundles.php
return [
...
Arobases\SyliusRightsManagementPlugin\ArobasesSyliusRightsManagementPlugin::class => ['all' => true],
...
];
//src/Entity/User/AdminUser.php
declare(strict_types=1);
namespace App\Entity\User;
use Arobases\SyliusRightsManagementPlugin\Entity\AdminUserInterface;
use Arobases\SyliusRightsManagementPlugin\Entity\AdminUserTrait;
use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\AdminUser as BaseAdminUser;
#[ORM\Entity]
#[ORM\Table(name: 'sylius_admin_user')]
class AdminUser extends BaseAdminUser implements AdminUserInterface
{
use AdminUserTrait;
}
php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate