PHP code example of adonko3xbitters / symfony-archivable
1. Go to this page and download the library: Download adonko3xbitters/symfony-archivable 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/ */
adonko3xbitters / symfony-archivable example snippets
use adonko3xBitters\SymfonyArchivable\Archivable;
#[ORM\Entity]
class Article
{
use Archivable;
// other properties...
}
$article->setArchivedAt(new \DateTimeImmutable());
$entityManager->flush();
$entityManager = $this->getDoctrine()->getManager();
$entityManager->getFilters()->disable('archived');
// perform query including archived entities...
$entityManager->getFilters()->enable('archived');
css
src/
├── Archivable.php
└── Doctrine/
└── ArchivedFilter.php