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 | |
namespace My\SomethingBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use Symfony\Component\HttpFoundation\File\File; | |
use Symfony\Component\Validator\Constraints as Assert; | |
use Vich\UploaderBundle\Mapping\Annotation as Vich; | |
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
/** | |
* Creates a new Banner entity. | |
* | |
* @Route("/create", name="admin_banner_create") | |
* @Method("post") | |
* @Template("MySomethingBundle:AdminBanner:index.html.twig") | |
*/ | |
public function createAction() | |
{ | |
$entity = new Banner(); |
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
vich_uploader: | |
db_driver: orm | |
twig: true | |
gaufrette: false | |
storage: vich_uploader.storage.file_system | |
mappings: | |
banner_image: | |
uri_prefix: /uploads/banners | |
upload_destination: %kernel.root_dir%/../web/uploads/banners |
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
/** | |
* @REST\Put("/services/trails/{id}/", name="find2ride_trails_put") | |
*/ | |
public function editAction(Trail $trail) { | |
return $this->processForm($trail); | |
} |
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
[ | |
{ | |
"trail_name": "Mario", | |
"text": "eksldksldksd", | |
"image_path": "oeoeoe.png", | |
"techniques": [], | |
"difficulty": "da matti", | |
"trail_url": "epwpewpe.it", | |
"ratings": 234, | |
"mid_rate": 234, |
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
{ | |
"trail_id": 2342, | |
"trail_name": "TOBOGA", | |
"bikepark_id": 342, | |
"bikepark_name": "Prato Selva Bikepark", | |
"place": { | |
}, | |
"text": "", | |
"image_url": "", |
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
#definizione servizi | |
#path/to/my_bundle/Resources/config/services.yml | |
services: | |
my_bundle.json_handler: | |
class: MyBundle\..\View\JsonViewHandler | |
my_bundle.view_handler: | |
parent: fos_rest.view_handler.default | |
calls: |
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 linkCustomerAction($id) | |
{ | |
$customer = $this->getDoctrine()->getRepository('PugMRestDemoBundle:Customer')->find($id); | |
$links = $this->getRequest()->attributes->get('links'); | |
foreach($links as $invoice){ | |
$customer->addInvoice($invoice); | |
} | |
$this->getDoctrine()->getManager()->flush(); | |
} |
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
{% block javascripts %} | |
{{ parent() }} | |
<!-- questo è quell che aggiungi nel singolo template con assetic--> | |
{% javascripts | |
'@SiparioMainBundle/Resources/public/js/NominativiDaAssegnareGrid.js' %} | |
<script type="text/javascript" src="{{ asset_url }}"></script> | |
{% endjavascripts %} | |
{% endblock %} |
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
[ | |
{ | |
"trail_name": "Mario", | |
"text": "eksldksldksd", | |
"image_path": "oeoeoe.png", | |
"techniques": [], | |
"difficulty": "da matti", | |
"trail_url": "epwpewpe.it", | |
"ratings": 234, | |
"mid_rate": 234, |
OlderNewer