This file contains hidden or 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
| {% include 'EsolutionsAdminBundle:Order/display/listing:list.html.twig' with {'orders': entities} %} |
This file contains hidden or 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
| {% if "now"|date('Ymd') > entity.date|date('Ymd') %} |
This file contains hidden or 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
| $file = $this->getRequest()->files->get('esolutions_adminbundle_prestationtype'); | |
| if(!empty($file['logo'])) { | |
| $extention = $file['logo']->guessExtension(); | |
| if($extention === 'jpeg' || $extention === 'png') { | |
| $entity->setPathLogo($file['logo']); | |
| $entity->setLogo($file['logo']); | |
| } else { | |
| $this->get('session')->getFlashBag()->add('error', 'Le format de votre image n\'est pas autorisé, elle doit être au format Png ou Jpeg.'); |
This file contains hidden or 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
| {# in twig template #} | |
| {{ myString | truncate(20, false, '') }} | |
| {# cette première utilsation coupe directement la chaîne myString #} | |
| {{ myString | truncate(20, true, '...') }} | |
| {# cette deuxieme utilsation coupe la chaîne myString en rajoutant ' ... ' |
This file contains hidden or 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
| ns3327676.ovh.net - | |
| sdns2.ovh.net |
This file contains hidden or 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
| /** | |
| * Display widget last products. | |
| * | |
| * @Template("EsolutionsProductBundle:Product\widgets:last_products.html.twig") | |
| */ | |
| public function lastProductsAction($nb_products = 10) { | |
| $em = $this->getDoctrine()->getManager(); | |
| $products = $em->getRepository('EsolutionsProductBundle:Product')->findBy(array(), array('last_update' => 'DESC'), $nb_products); | |
This file contains hidden or 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
| $data = $this->getRequest()->request->get('form'); |
This file contains hidden or 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
| /** | |
| * Get the current logged in User Object | |
| * @return \Symfony\Component\Security\Core\User\User | |
| */ | |
| private function getUser(){ | |
| return $this->get('security.context')->getToken()->getUser(); | |
| } |
This file contains hidden or 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 | |
| // AppKernel.php | |
| class AppKernel extends Kernel | |
| { | |
| //.. | |
| //....... | |
| //........... | |
| // --- Append the init function below --- | |
This file contains hidden or 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
| $this->get('session')->getFlashBag()->add('notice', 'Your changes were saved!'); |
NewerOlder