Symfony2 is an open source PHP web development framework for PHP 5.3.3+ focusing on easy and fast development cycles and including state-of-the-art design patterns and programming philosophies.
0
votes
1answer
15 views
OrderBy a relation in an entity
I've got a headache :) Been trying to google this for an hour, and before that trying to solve it for an hour.
I've got an entity A with a ManyToOne relation to another entity B. I need to sort a ...
0
votes
1answer
15 views
doing inner joins on the first row of the table
I have an entity which is called Product. Product has an array of ProductPicture.
Here's a snippet of the code:
/**
* @ORM\OneToMany(targetEntity="Site\MainBundle\Entity\ProductPicture", ...
1
vote
1answer
11 views
Symfony2 hook after template render
I've got a small question here: is there a way to do some actions after a template has been rendered ? A sort of Listener or hook which is called after a specific template has been rendered ?
In my ...
0
votes
1answer
25 views
troubles about bindRequest(),$form->isValid()
I made form as discribed here.
but it always $form->isValid() always returns false.
$searchTime = new SearchTime();//SearchTime is my entity name
$form = ...
0
votes
1answer
16 views
link two fields select type symfony2
i work with Symfony2 and I want to see how I can use Form Events to link two fields select type.
The first field contains the cities and the second contains the country.
here is my entities:
user
...
0
votes
1answer
8 views
FosUserBundle registration validation new image field
I am using FOSUserBundle and i have problem with validation user entity.
In my user entity i have:
/**
* @Assert\NotBlank()
* @Assert\File(
* maxSize="3M",
* mimeTypes={"image/png", ...
2
votes
2answers
33 views
Pattern for global data in Symfony2
Hi I'm working on an Sf2 project, and I re-use an array with U.S. state postal codes throughout the application-- in controllers, validation, and form classes. What's the best place to stash this ...
1
vote
1answer
25 views
Symfony2 : add a new target for assetic finder
In my symfony project I have a bundle named Modules that included of many modules that each one saved in a separate directory into src/ModuleBundle/Modules directory and they have separate twig files ...
0
votes
1answer
11 views
Warning: require_once(PHPUnit/Autoload.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 49
This is my complete error message:
Warning: require_once(PHPUnit/Autoload.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 49
Fatal error: require_once(): Failed ...
0
votes
1answer
20 views
How can I select the users which are belonging to group A?
How can I select the users which are belonging to group A?
My tables are below.
my user table.
ID | name |sex
1 | bob |1
2 | kayo |2
3 | ken |1
my fos_group table
ID | name
1 | student
2 ...
0
votes
1answer
26 views
Setting property value in custom form type
I have an entity Category that has Category children like a tree.
I have a CategorySelectorType that has a few non-mapped fields which
determine what Category should be set to the form data.
I want ...
0
votes
1answer
29 views
I Implements class and method but it still asks to implement
I am using symfony2 ,doctroin2 and calendR.
I am trying to integrate calendR with doctrine2.
I made service as discribed here
services:
booking_repository:
class: ...
2
votes
2answers
51 views
how to get partal result from doctrine query builder
I have a product entity in which it has an array as attributes:
/**
* @ORM\OneToMany(targetEntity="Shopious\MainBundle\Entity\ProductPicture", mappedBy="product", ...
0
votes
1answer
14 views
Symfony2 Environment Configuration
I have a Symfony2 application with JS+PHP files that should access
"http://localhost/blahblah"
when on my development machine, but
"http://mydomain.com/blahblah"
when I push them to the ...
0
votes
1answer
10 views
Symfony2 PDOSessionHandler Allows me to view one page, then kicks me out
I'm trying to implement PDOSessionHandler for my Symfony2 setup.
It allows me to log in and takes me to the first page. But then when I try to navigate anywhere else, it takes me back to the log in ...