filament-typo3 bundles some functionality known from TYPO3 into a Filament PHP plugin. Features include the TYPO3 entry access tab, SEO tab and pages tree view.
You can install the package via composer:
composer require egg2-code-labs/filament-typo3
The TYPO3 Access Tab feature consists of multiple parts:
- Migration helpers
- Filament component
- Query scope
Make use of the migration helpers to get all the required fields:
public function up(): void
{
Schema::create('pages', function (Blueprint $table) {
//
$table->typo3Sorting();
$table->typo3Access();
//
});
}
Then, in your filament resource add the form component:
use Egg2CodeLabs\FilamentTypo3\Forms\Components\Typo3AccessTabFieldsEnum;
public static function form(Form $form): Form
{
return $form
->schema([
Tabs::make('Tabs')
->tabs([
Typo3AccessTab::make()
->exclude([ // disable the nav_hide field, because the resources does not use it
Typo3AccessTabFieldsEnum::NAV_HIDE,
])
])
]);
}
And finally add the query scope to all the necessary models:
use Egg2CodeLabs\FilamentTypo3\Scopes\Typo3AccessScope;
protected static function booted(): void
{
static::addGlobalScope(new Typo3AccessScope());
}
composer test
Please see CHANGELOG for more information on what has changed recently.
Feel free to contribute by writing tests, fixing bugs, reporting bugs or whatever other way of contribution you come up with. Just create a pull request or issue and I'll do my best to reply fast.
The MIT License (MIT). Please see License File for more information.
Some components of this package are based on one or more of the following pieces of software: