1. Go to this page and download the library: Download mb4it/bitrix-admin-kit 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/ */
mb4it / bitrix-admin-kit example snippets
declare(strict_types=1);
namespace Vendor\Demo\Admin;
use MB\Bitrix\AdminKit\Action\BulkAction;
use MB\Bitrix\AdminKit\Action\RowAction;
use MB\Bitrix\AdminKit\Field\ID;
use MB\Bitrix\AdminKit\Field\Switcher;
use MB\Bitrix\AdminKit\Field\Text;
use MB\Bitrix\AdminKit\Filter\Types\TextFilter;
use MB\Bitrix\AdminKit\Resource\DataManagerResource;
use Vendor\Demo\Orm\ProductTable;
final class ProductResource extends DataManagerResource
{
protected string $title = 'Товары';
public function dataManagerClass(): string
{
return ProductTable::class;
}
public function indexFields(): iterable
{
return [
ID::make('ID', 'ID'),
Text::make('Название', 'NAME'),
Switcher::make('Активен', 'ACTIVE'),
];
}
public function formFields(): iterable
{
return [
Text::make('Название', 'NAME')->
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.