PHP code example of sqli / ezplatform_adminui_extended

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

    

sqli / ezplatform_adminui_extended example snippets


// app/AppKernel.php

public function registerBundles()
{
    $bundles = [
        // ...
        new SQLI\EzPlatformAdminUiExtendedBundle\SQLIEzPlatformAdminUiExtendedBundle(),
    ];
}


namespace Acme\AcmeBundle\Entity\Doctrine;

use SQLI\EzPlatformAdminUiExtendedBundle\Annotations\Annotation as SQLIAdmin;

/**
* Class MyEntity
 * 
 * @package Acme\AcmeBundle\Entity\Doctrine
 * @ORM\Table(name="my_entity")
 * @ORM\Entity(repositoryClass="Acme\AcmeBundle\Repository\Doctrine\MyEntityRepository")
 * @SQLIAdmin\Entity(update=true,
 *                   create=true,
 *                   delete=false,
 *                   csv_exportable=false,
 *                   max_per_page=5,
 *                   tabname="other_tab"
 *                   description="Describe your entity")
 */
class MyEntity
{
    /**
     * @var int
     *
     * @ORM\Column(name="id",type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;
    
    /**
     * @var string
     *
     * @ORM\Column(name="data",type="string")
     * @SQLIAdmin\EntityProperty(visible=false)
     */
    private $data;
    
    /**
     * @var string
     * 
     * @ORM\Column(name="text",type="string")
     * @SQLIAdmin\EntityProperty(description="Describe property of your entity",readonly=true)
     */
    private $text;
    
    /**
     * @var string
     * @ORM\Column(name="select",type="int")
     * @SQLIAdmin\EntityProperty(choices={"First choice": 1, "Second choice": 2})
     */
    private $select;
    
    /**
     * @var integer
     * @ORM\Column(name="content_id",type="int")
     * @SQLIAdmin\EntityProperty(extra_link="location") 
    */
    private $contentID;
    
    // ...
    public function getId()
    {
        return $this->id;
    }
    
    public function getData() : ?string
    {
        return $this->data;
    }
    
    public function getText() : string 
    {
        return $this->text ?: '';
    }
    
    public function getSelect() : int
    {
        return $this->select;
    }
    
    public function getContentID(): int
    {
        return $this->contentID;
    }
}
bash
php bin/console assetic:dump
php bin/console cache:clear