PHP code example of kachnitel / entity-components-bundle

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

    

kachnitel / entity-components-bundle example snippets


// Any entity that needs tags — no extra ORM mapping aggableTrait;
    public function __construct() { $this->initializeTags(); }
}

#[Assert\NotBlank]
#[Assert\Length(max: 100)]
private ?string $name = null;
twig
<twig:K:Entity:TagManager :entity="product" tagClass="App\\Entity\\Tag" :readOnly="true" />