This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Using display: table-cell to evenly determine widths. You can add an arbitrary number of <li> | |
*/ | |
ul { | |
padding: 0; | |
display: table; | |
width: 100%; | |
background: hotpink; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Using display: table-cell to evenly determine widths. You can add an arbitrary number of <li> | |
*/ | |
ul { | |
padding: 0; | |
display: table; | |
width: 100%; | |
background: hotpink; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Project/Bundle/AdminBundle/Resources/config/services.yml | |
services: | |
project.temporada.admin.temporada: | |
class: Project\Bundle\AdminBundle\Temporada | |
calls: | |
- [ setTranslationDomain, messages] | |
//Project/Bundle/AdminBundle/Resources/translations/messages.es.xlf | |
<?xml version="1.0"?> | |
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$form = $this->createFormBuilder() | |
//$form = $this->get('form.factory')->createNamedBuilder('mes') | |
->setAction($this->generateUrl('project_frontend_galeria')) | |
->setMethod('GET') | |
->add('mes', 'choice', array('choices' => $mesesGaleriaNombre)) | |
->add('submit', 'submit', array('label' => 'Mostrar')) | |
->getForm(); | |
$form->handleRequest($request); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function handleRequest($request = null) | |
{ | |
$this->config->getRequestHandler()->handleRequest($this, $request); | |
return $this; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$em = $this->getDoctrine()->getManager(); | |
$query = $em->createQuery( | |
'SELECT c | |
FROM PlacasFrontendBundle:Columna c | |
JOIN c.products p | |
ORDER BY c.posicion ASC, p.posicion ASC' | |
); | |
$columnas = $query->getResult(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class AbstractType implements FormTypeInterface | |
{ | |
/** | |
* {@inheritdoc} | |
*/ | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
} | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Placas\FrontendBundle\Admin; | |
use Sonata\AdminBundle\Admin\Admin; | |
use Sonata\AdminBundle\Datagrid\ListMapper; | |
use Sonata\AdminBundle\Datagrid\DatagridMapper; | |
use Sonata\AdminBundle\Form\FormMapper; | |
use Sonata\AdminBundle\Route\RouteCollection; | |
//use Placas\FrontendBundle\Form\Type\ChoiceOrTextType; | |
class CategoriaAdmin extends Admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\OptionsResolver\OptionsResolverInterface; | |
use Placas\FrontendBundle\DataTransformer\ValueToChoiceOrTextTransformer; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\Form\FormInterface; | |
use Symfony\Component\Form\FormView; | |
class ChoiceOrTextType extends AbstractType | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
->add('menu', new ChoiceOrTextType(), array( | |
'choices' => array('Option 1' => 'Option 1', 'Option 2' => 'Option 2'), | |
'required' => false,)) | |
; |
OlderNewer