PHP code example of ezar101 / easyadmin-trix-extension-bundle

1. Go to this page and download the library: Download ezar101/easyadmin-trix-extension-bundle 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/ */

    

ezar101 / easyadmin-trix-extension-bundle example snippets




namespace App\Controller\Admin;

use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
use Ezar101\EasyAdminTrixExtensionBundle\Field\ExtendedTextEditorField; // <-- Import of the new field

class PostCrudController extends AbstractCrudController
{
    public static function getEntityFqcn(): string
    {
        return Post::class;
    }

    public function configureFields(string $pageName): iterable
    {
        yield ExtendedTextEditorField::new('content')
            ->setNumOfRows(10)
            ->setColumns(12);
            
        // You can use all the usual TextEditorField methods
    }
}
bash
php bin/console assets:install