PHP code example of sasedev / hidden-entity-type-bundle

1. Go to this page and download the library: Download sasedev/hidden-entity-type-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/ */

    

sasedev / hidden-entity-type-bundle example snippets



// config/bundles.php

return [
    // ...
    Sasedev\HiddenEntityTypeBundle\SasedevHiddenEntityTypeBundle::class => ['all' => true],
    // ...
];



use Sasedev\HiddenEntityTypeBundle\Form\Type\HiddenEntityType;

// ...
$builder->add('entity', HiddenEntityType::class, array(
    'class' => YourBundleEntity::class
));



use Sasedev\HiddenEntityTypeBundle\Form\Type\HiddenDocumentType;

// ...
$builder->add('document', HiddenDocumentType::class, array(
    'class' => YourBundleDocument::class
));


// ...
$builder->add('entity', HiddenEntityType::class, array(
    'class' => YourBundleEntity::class, //  // support for an array of entities, not o entity found, not