1. Go to this page and download the library: Download illusiard/yii2-entity-acl 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/ */
illusiard / yii2-entity-acl example snippets
interface SubjectResolverInterface
{
public function resolveGroupId(int $userId, array $context = []): ?int;
public function resolveOwnerId(AccessRequest $req): ?int;
}
interface ConditionHandlerInterface
{
public function supports(string $type): bool;
public function evaluate(array $payload, AccessRequest $req, ConditionEngine $engine): bool;
}