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 | |
// src/Acme/DemoBundle/Tests/Selenium/DemoTest.php | |
namespace Acme\DemoBundle\Tests\Selenium; | |
use Acme\DemoBundle\Tests\SeleniumTestCase; | |
class DemoTest extends SeleniumTestCase | |
{ |
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
officeGeolocator.preUpdate: | |
class: Phoenix\CRMBundle\Listener\OfficeGeolocator | |
calls: | |
- [ setMapit, [@phoenixcrm.mapit] ] | |
tags: | |
- { name: doctrine.event_listener, event: preUpdate } |
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 Acme\DemoBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="folder") | |
*/ |
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->getEntityManager(); | |
$viewing = new Viewing(); | |
$viewing->setMeetingPerson('t'); | |
$viewing->setMeetingPlace('t'); | |
$viewing->setContactNumber('1'); | |
$viewing->setViewingAt(new \DateTime()); | |
$lmo = new LeadMatchingOffice(); |
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
class LeadMatchingOfficeViewingsType extends AbstractType | |
{ | |
public function buildForm(FormBuilder $builder, array $options) | |
{ | |
$builder | |
->add('viewings', 'collection', array( | |
'type' => new ViewingsListType() | |
)) | |
; | |
} |
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
$this->get('test.service'); | |
yeilds: | |
array (size=2) | |
0 => string 'hello' (length=5) | |
1 => string 'world' (length=5) |
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 whateverAction() | |
{ | |
$form = $this->createForm(new ViewingReportType($viewings)); | |
$form->bindRequest($this->getRequest()); | |
if($form->isValid()) { | |
die('valid'); | |
} |
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
test |
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
... | |
class AcmeChildBundle extends Bundle | |
{ | |
public function getParent() | |
{ | |
return 'AcmeParentBundle'; | |
} | |
} |
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
// in the formtype | |
->add('my_datetime_field', 'datetime', array( | |
'widget' => 'single_text', | |
'required' => true, | |
)) | |
// using jqueryui + http://trentrichardson.com/examples/timepicker/ | |
$(element).datetimepicker({ | |
dateFormat: 'dd/mm/yy', | |
timeFormat: 'hh:mm', |
OlderNewer