PHP code example of gonzakpo / comun

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

    

gonzakpo / comun example snippets

cli
php composer.phar 
 php
new Tecspro\Bundle\ComunBundle\TecsproComunBundle(),
 php
$helpersObjectRelation = $this->get('tecspro_comun.helpers_object_relation');

$originalEntities = $entity->getEntities()->getValues();
$form->handleRequest($request);
$newEntities = $entity->getEntities()->getValues();

$entitiesAdd = $helpersObjectRelation->getEntitiesToAdd($newEntities, $originalEntities);

$entitiesRemove = $helpersObjectRelation->getEntitiesToRemove($newEntities, $originalEntities);
 php
$services_comunmailer = $this->get('tecspro_comun.comun_mailer');

$services_comunmailer->send_mailer($asunto, $remitente, $destinatarios, $mensaje);
 php
->add('campo', null, array(
    'attr'  => array(
        ...
        'class' => 'mwsValidaPatron',
        'mwspatron' => '[0-9]',
    )
))
 php
->add('campo', null, array(
    'attr'  => array(
        ...
        'onkeypress' => 'return validaPatron(event, "[0-9]")',
    )
))
 php
->add('campo', null, array(
    'attr'  => array(
        ...
        'class' => 'mwsReemplazaValor',
        'mwsreemplazar'    => '.',
        'mwsreemplazarpor' => ',',
    )
))