PHP code example of ics / ssi-bundle

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

    

ics / ssi-bundle example snippets


// config/bundles.php

return [
    // ...
    ICS\SsiBundle\SsiBundle::class => ['all' => true],
];

    // Controller/Admin/DashboardController.php
    use ICS\SsiBundle\Entity\Account;
    use ICS\SsiBundle\Entity\Log;

    class DashboardController extends AbstractDashboardController
    {
        public function configureMenuItems(): iterable
        {
            // ...
            yield MenuItem::section('Security', 'fa fa-shield');
            yield MenuItem::linkToCrud('Accounts', 'fa fa-user-circle', Account::class);
            yield MenuItem::linkToCrud('Logs', 'fa fa-newspaper', Log::class);
            // ...
        }
    }


    use Doctrine\ORM\Mapping as ORM;
    use ICS\SsiBundle\Annotation\Log;
    /**
     * @ORM\Entity()
     * @ORM\Table()
     * @Log(actions={"all"},property="logMessage")
     */
    class Account implements UserInterface
    {
        /**
         * @ORM\Column(type="string", length=180, unique=true)
         */
        private $username;

        public function getLogMessage()
        {
            return $this->username.' (#'.$this->getId().')';
        }

    }
bash
# Installer la base de données

php bin/console doctrine:schema:create