PHP code example of antoniosam / easypanelbundle
1. Go to this page and download the library: Download antoniosam/easypanelbundle 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/ */
antoniosam / easypanelbundle example snippets
$list->enableSearch($value,$textbutton = 'fa-search',$classbutton='btn',$classcontainer='')
$list->enableOrder($route,$parametersroute,$ordercolumn = 1,$ordertype = 'ASC');
$list->setPageInfo($pageinfo);
$list->createListPages($search,$route,$classitem,$classactive,$first = "",$last = "");
$list->setFirstColumnCount(true);
php bin/console easypanel:create:panel nombre_proyecto directorio_entitys tipo
php bin/console easypanel:create:panel "Admin Mascotas" Entity(equal = /src/Entity) html
php bin/console easypanel:create:panel Demo Entity html --folder=admin --prefix=admin
php bin/console easypanel:create:panel Demo Entity api --folder=api --prefix=api
php bin/console easypanel:create:panel "Admin Mascotas" Entity --clase_login=usuario
ej.
php bin/console easypanel:create:panel "Admin Mascotas" Entity html --folder=admin --prefix=admin --clase_login=usuario
php bin/console easypanel:create:menu Demo Entity
php bin/console easypanel:create:modulo App\Entity\Mascota
php bin/console easypanel:create:modulo App\Entity\Mascota api --folder=api --prefix=api
Output
/project_root/src/Controller/MascotaController.php
/project_root/src/Controller/Api/MascotaController.php
$list->renderAsText('nombre'); <p>Popi</p> Default para todos los campos
$list->renderAsImage('foto','uploads/images'); domain.com/asssets/uploads/images/perro.jpg
$list->renderAsBoolean('activo'); <i class="fa fa-check"></i> <i class="fa fa-times"></i>
$list->renderAsDate('nacimiento'); 2020-01-01
$list->renderAsTime('consulta_hora'); 12:00:00
$list->renderAsDateTime('creacion'); 2021-01-01 09:00:00
$list->renderAsRaw('descripcion'); <p>Parrafo generado con algun editor web</p>
$list->renderAsJson('Etiquetas'); <ul><li>Pequeña</li><li>Cachorro</li></ul>
$list->renderAsLink('certificado','uploads/docs'); domain.com/asssets/uploads/docs/CErtificado.pdf
$list->renderAsTranslate('cv'); (detalle acontinuacion)
$vista->renderAsLink('fotoperfil',$this->generateUrl('file_preview',['archivo'=>$objeto->getArchivo()]))
...
<a href="/vista/registro1.pdf/preview" target="_blank" class="img-responsive easypanel-link">registro1.pdf</a>