PHP code example of kumwe / administrator-contract
1. Go to this page and download the library: Download kumwe/administrator-contract 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/ */
kumwe / administrator-contract example snippets
use Kumwe\Administrator\Contract\AdministratorContributionAdmission;
use Kumwe\Administrator\Contract\AdministratorRouteDefinition;
use Kumwe\Administrator\Contract\AdministratorViewDefinition;
use Kumwe\Contribution\ContributionOwner;
use Kumwe\Access\Capability;
$view = new AdministratorViewDefinition('acme.editor.index', 'editor/index.twig');
$route = new AdministratorRouteDefinition(
'acme.editor.route', '/editor', ['GET'], 'acme.editor.read', $view->identifier(),
);
$admission = new AdministratorContributionAdmission(
ContributionOwner::extension('acme/editor'), $route, Capability::fromString('acme.editor.read'),
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.