Hi guys, I have a question regarding the view.yml file in Symfony. Basically I would like to be able to include certain javascript SDKs in my layout with the help of the view.yml file like so:
first i would add an entry the the corresponding view file:
all:
load_facebook: true
load_twitter: true
stylesheets:
javascripts:
...
I am learning Symfony and I'm working with the following URI:
url_for('newItem/show?id='.$item->getId().'&name='.$item->getName().'&summary='.$item->getSummary())
With the below routing.yml
item_show_user:
url: /newItem/:name/:summary
param: {module: newItem, action: show}
# default rules
homepage:
url: /
param: { mod...
I want to know if it is possible to add multiple handlers for the same filter. For my case I use sfGuardPlugins remember me filter, but I would like to use the remember me filter from sfFacebooConnectPlugin.
Can I make both these filters to work on the remember_me filter, or should I create my own filter handler which would treat both c...
I am using symfony 1.4, to create my project with propel as ORM. i want to get the response in JSON format, when i call a url. I have set the headers to "application/json" but it is not working, i am getting the response back in HTML format..which i am not able to decode. How can we set content-type in symfony??
example code:
Action-
...
I have to set up continous integration for php. My CI server should be able to build the project, run the unit tests and create a report with the result. What would be the best continuos integration tool for a symfony project? I can't decide between phpUnderControl + CruiseCotrol, Xinc, or Hudson.
...
Hi,
I'm stumped on why when I do doctrine:build -all it throws 2 warnings.
I've tried commenting out all the schema.yml files and it still throws it.
Anyone better informed help me understand where it is coming from, is there some caching I am unaware of?
I've deleted the cache (./symfony cc). Manually deleted all the lib/ models, forms...
Ok, so this is my issue. I have a page that lists a bunch of categories under a subdomain. I'm trying to clean the cache for that page if the user is logged in.
In the action I'm using this:
if ($this->getUser()->isAuthenticated())
{
if($cache = $this->getContext()->getViewCacheManager())
{
$cache->remove('category/index?subdoma...
Hi.
For a form I want to retrieve all entries of a table. Therefore I use the getChoices method of the sfWidgetFormDoctrineChoice class.
protected function getPaymentTypes(){
$typesWidget = new sfWidgetFormDoctrineChoice(
array(
'model'=>'PaymentType',
'method'=>'getName',
'order_by'=...
I'm using symfony 1.4.8 and I have some code that basically looks like this (in a Filter):
$user = $this->getContext()->getUser();
if ($condition)
$user->addCredential('cred');
else
$user->removeCredential('cred');
die($user->hasCredential('cred');
No matter what I have done, it always registers that it has the cred credential...
The login form works fine, but any other form I submit (things like editing or creating data) I get a CSRF attack detected error. I have tried to clear symfony and browser cache, deleted cookies, tried multiple browsers and multiple computers.
What can cause this? When I turn off the CSRF protection it works fine.
...
I'm writing a restful XML API for a university assignment, the spec requires no HTML frontend.
There doesn't seem to be any documentation (or guessable functionality) regarding how to change the default format? Whilst thus far I have created all templates as ...Success.xml.php it would be easier to just use the regular ones and set this...
Hello,
I'm looking for a symfony-based CMS, and I have heard about Diem and Apostrophe, but none of them offers all of the features I am searching for.
In your opinion, which of these CMS' is the most easy to extend? Do you know any other Symfony-based CMS I would want to consider?
EDIT : By 'to extend' I mean adding probably unsupport...
I have a table using Doctrine's Searchable behaviour, which works well for single word queries. However I've noticed that when a query includes a space, the page hangs and I can't get any response out of refreshing the page etc.
If I open Activity Monitor on my Mac, or SSH then 'top' in Ububntu, MySQL is running a process at up to 300% ...
My Example
Relatively simple layout.xml.php:
<?xml version="1.0" encoding="<?php echo sfConfig::get('sf_charset', 'UTF-8') ?>"?>
<example>
<?php echo $sf_content ?>
</example>
Simply isn't being used by any XML templates e.g. indexSuccess.xml.php
The Symfony documentation states:
The layout is automatically disabled for XML HT...
Hello,
I've got this weird error when i try to generate either the filters or the form on my production server.
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to
allocate 20 bytes) in /var/www/project/lib/vendor/symfony/
lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Core.php on
line 669
I don'...
The university servers I'm currently working on lack PDO drivers, hence I've had to re-implement PDO & it's respective MySQL class to allow doctrine to connect to a MySQL database.
This is all well and good (or as well as a PHP implementation of PDO can go) and obviously if uni didn't have PDO at all this would all just work.
However, ...
I'm using Doctrine 1.2 and Symfony 1.4.
In my action, I have two different query that return different result set. Somehow the second query seem to change the result (or the reference?) of the first one and I don't have any clue why..
Here is an example:
$this->categories = Doctrine_Query::create()
->from('Categorie AS c')
...