Questions tagged [symfony-2.5]

This is the Symfony 2.5.x specific tag. Use it in addition to the symfony2 tag if your question is specific to Symfony 2.5.x — not just 2.x.

Symfony is a PHP full-stack web framework developed and maintained by Sensio Labs.

Information

This tag is specific for the 2.5 version of Symfony, which was released on the 1st June 2014. See the tag for general Symfony 2.x questions.

As of 1 June 2014, the latest stable release of Symfony 2.5 is version 2.5.0.

Living on the edge

There are a set of interesting links on the symfony blog about what's new in this version:

Useful links

152 questions
1
vote
1 answer

symfony 2.5 content editable web page and save

I am working on a project using symfony 2.5 It should be able to have a webpage that is editable text, bg color, bg image, and images etc. I use tinymce for inline editing. my question is how should I save these web pages to the database. I am going…
Andrei
  • 177
  • 13
1
vote
1 answer

Using objects inside sonata_type_immutable_array (especially like sonata_type_immutable_array)

Problem description I need to define object-related field (like sonata_type_model_list) inside sonata_type_immutable_array form type definition: $formMapper->add('options', 'sonata_type_immutable_array', array( 'keys' => array( …
Arkemlar
  • 380
  • 4
  • 12
1
vote
1 answer

Symfony 2 - Gedmo Uploadable error durng edition

I have everything configured as in documentation and everything works perfect if I upload all files. But when I want change only other elements in form without changing photo i have received following error message: You must pass an instance of…
dbcoder
  • 11
  • 1
1
vote
1 answer

Symfony2: accessing parameter.yml in view ( php template )

am using following parameters.yml parameters: mailer_transport: smtp mailer_host: 127.0.0.1 mailer_user: null mailer_password: null locale: en secret: ThisTokenIsNotSoSecretChangeIt name: krishnakumar but when an trying…
user1679267
  • 77
  • 2
  • 8
1
vote
0 answers

PHP Symfony2 knp menu bundle: Using foreach to generate children raises an Illegal offset type exception

We are a developing a travelling website using Symfony2. I am currently stuck on menu. The current design is a multi-level menu organised as such: continents-> countries -> regions. Country sub-menus being grouped per continent and regions per…
Bevelopper
  • 75
  • 1
  • 9
1
vote
0 answers

How do I access fragments url in development?

In a template I include the components via subrequests via: {% extends 'HnDocumentBundle:Default:PrintableDocumentLayout.html.twig' %} {% block printable_document_content %} {{…
k0pernikus
  • 60,309
  • 67
  • 216
  • 347
1
vote
2 answers

Symfony-2, inserting user in buildForm() function

I have two entities (User and Project), with generated CRUD options. Relation between entities is OneToMany bidirectional (user 1 - * project). In project/new, CRUD generated drop-down list for Users, but I want to set logged User automatically,…
ddtr
  • 45
  • 5
1
vote
1 answer

How do I search only first object in an array of nested objects using ElasticSearch

I'm using ElasticaBundle and ElasticSearch with Symfony2 in a system I've written. A 'person' can have many 'positions' in their work history. The positions are sorted by date desc, and in order to find someone's current position with PHP I…
1
vote
1 answer

How to apply some validations in a column in Propel schema?

I am using Propel schema to create database tables. In a table, i need to create a 'name' column which should hold a 'short string', 'all in lower case', and 'with no spaces', for example: 'join', 'appointment'. How can I define this column in…
Meelan
  • 70
  • 6
1
vote
1 answer

Doctrine mapping field error

i have a Entity with 2 attributs _obc_id, obc_id class myEntity { ... /** * @ORM\Column(name="obc_id", type="integer", nullable=false) */ private $obc_id; /** * @ORM\Column(name="_obc_id", type="integer", nullable=false) */ …
Zed75
  • 11
  • 3
1
vote
1 answer

restricting access to pages on my site if I did not start session in Symfony2 with fosuser

I have installed in my application FosUserBundle with a version of Symfony 2.5, i can access to my site: MySite/login and logout: MySite/logout, but regardless if a user is logged it let's me access to any page of my site How I can give solution to…
zethly
  • 13
  • 2
1
vote
1 answer

Symfony2 Lifecycle Events wont fire on update() function

My postUpdate function fire only when the change is by a form submit, when the change comes by an update function as the following it wont fire. my post update function : public function postUpdate(LifecycleEventArgs $args) { error_log('in post…
1
vote
1 answer

Adding extra field in many_to_many symfony2 relationship

Im looking for a way to handle many_to many relationship in symfony2 with extra field, I have 3 entities : Skill/Training/Skill-Training .Every training should affect some skills and increment the level of those skills. So Skill-Training table is…
Hajri Aymen
  • 620
  • 6
  • 18
1
vote
1 answer

Validate ajax dynamic checkbox fields (this value is not valid)

I have a form with tags which have dependencies with a category field Category 1 tag a tag b tag c Category 2 tag d tag e tag f ... When loading the page, I have "Category 1" and "the list of his tags" Then when I change…
Mario Radomanana
  • 1,698
  • 1
  • 21
  • 31
1
vote
0 answers

How to use single inheritance in propel schema

I need to make a 'Event' class and propel schema with Columns: id employee_id date_start date_end type How to implement the simple inheritance based on the type column. All classes should extend the abstract Event class. Initial…
Meelan
  • 70
  • 6