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 | |
protected function _editAction(Post $post) | |
{ | |
$em = $this->get('doctrine.orm.default_entity_manager'); | |
$factory = $this->get('form.factory'); | |
$form = $factory->create(new PostFormType()); | |
$form->setData($post); | |
if ($this->get('request')->getMethod() === 'POST') { |
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
default: | |
pattern: / | |
defaults: { _controller: FrameworkBundle:Redirect:redirect, route: frontend_index } |
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
interface Symfony\Bundle\FrameworkBundle\Request\ParamConverter\ConverterInterface | |
{ | |
function convert($value); | |
function setOption($key, $option); | |
function getOption($key); | |
} |
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 | |
class Article extends Content | |
{ | |
protected $comments; // a Collection implementation, ArrayCollection or PersistentCollection | |
// get the ArrayCollection or PersistentCollection | |
public function getComments() | |
{ | |
return $this->comments; |