Hey all,
I'm trying to set some conditional statements for nested embedRelation() instances, and can't find a way to get any kind of option through to the second embedRelation.
I've got a "Measure->Page->Question" table relationship, and I'd like to be able to choose whether or not to display the Question table. For example, say I have...
Hi all,
I'm new to Symfony and I'm going through the Jobeet tutorial v1.4 for
Doctrine. I am currently stuck on Day 3. I've followed all the
instructions on configuring the database and building models and
modules; however, when I try to access
"http://localhost:8080/frontend_dev.php" I receive the following
error:
'Configuration "conf...
I want to be able to take the user to the requested page after login, but this does not happen with sfGuard.
** My Register action requires SignIn ;) **
On the listing page [http://cim/frontend_dev.php/]
-> user clicks the 'Register' link [@register = register/index]
-> user is taken to 'Signin' page provided by sfGuard
-> after sign-in...
Symfony has very useful feature - view component, this is small action code and template that you could embed anywhere inside view template:
<?php include_component('news') ?>
for example in above code mews component executes query in db and display results as block on a site page.
http://www.symfony-project.org/book/1_0/07-Inside-t...
Hi everyone, I am trying to find a better way to assign classes to form elements in symfony. Currently, I can't seem to get away from assigning each one manually. ie:
$this->widgetSchema['title']->setAttribute("class","fieldInput");
$this->widgetSchema['tag_line']->setAttribute("class","fieldInput");
$this->widgetSchema['description']->...
Hi,
i have created this query that works OK:
$q1 = Doctrine_Query::create()
->from('Usuario u')
->leftJoin('u.AmigoUsuario a ON u.id = a.user2_id OR u.id = a.user1_id')
->where("a.user2_id = ? OR a.user1_id = ?", array($id,$id))
->andWhere("u.id <> ?", $id)
->andWhere("a.estado LIKE ?", 1);
echo $q1->getSqlQue...
Until now, I have always said that CakePHP is too bloated and slow. I don't really know that, I just saw "some" benchmarks. What I really want to know, is that if those two frameworks (Symfony and CakePHP) are too slow to be usable in a way that the user will get frustrated. I already know that those frameworks are slower than other alte...
Hi folks.
I have an issue while displaying several forms of the same model on the same page.
The problem is that with the NameFormat, the fields have the same ID :
$this->widgetSchema->setNameFormat('display[%s]');
Will display
<form class="update_display_form" id="update_display_0" action="/iperf/web/frontend_dev.php/update_display...
Hi,
I created a custom yaml handler, myRunnerConfigHandler, and placed it under
apps/frontend/lib/myRunnerConfigHandler.class.php
and created a new config_handler and placed it under
apps/frontend/config/config_handler.yml
Now, under config_handler.yml,I placed my configuration for my new rundown:
modules/*/config/rundown.yml:
...
I have a UserForm class which has a select list populated from a related model (specified by a foreign relationship in the yml) like so:
$this->setWidget('report_id', new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Report'))));
I'd like to filter the Report objects that come from this relation by one of the...
Hi,
I posted a similar problem but it could not be resolved. I create a relational database of users and groups but for some reason I cannot insert test data with fixtures properly. Here is a sample of the schema:
User:
actAs: { Timestampable: ~ }
columns:
name: { type: string(255), notnull: true }
email: { type: string(255...
Hi!
I'm using the PHPExcel plugin for Symfony 1.4 (sfPHPExcelPlugin) on Ubuntu (using PHP 5.10), with this code for saving the file that I am writing:
// Save Excel 2007 file
echo date('H:i:s') . " Write to Excel2007 format\n";
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php'...
I am trying to generate a url but I keep getting a strange warning even though it works. I am making an api xml page and I use the following call in the controller:
public function executeList(sfWebRequest $request)
{
$this->users = array();
foreach($this->getRoute()->getObjects() as $user)
{
$this->users[$this->gene...
Is there a way to configure partitions thru Doctrine YML?
Just like we define indexes, is there a syntax?
If not, can raw SQL be added to the set-up function?
Thanks
...
Hi,
I'm trying to do a very simple sql query like this, to a propel Criteria :
SELECT count(id_user) FROM myTable WHERE id_page = 5
I did'nt found informations on the documentation.
Have you an idea ??
...
in the tutorial i can use either:
public function configure() {
$this->setWidgets(array(
'type' => new sfWidgetFormChoice(array(
'choices' => Doctrine_Core::getTable('Gender')->getTypesForForm(),
'expanded' => false,
'multiple' => false,
))
));
$this->widgetSchema['type']...
when i pass variables from a controller they are only passed to a template, not a layout surrounding that template.
how do i pass variables to a template?
thanks
...
Hi,
i want to show a select which options are the character '-' and a range of integers.
I have this:
$years = range(14,130);
new sfWidgetFormChoice(array('choices' =>
array_merge(array('' => '-',array_combine($years,$years)));
The problem: between the '-' and the range of integers there is a "0" (bold and italic).
Any he...
So I have 2 models. Users and Groups. Each group has a user as the creator and a group has many users. The FK of these tables are set up correctly, but I was wondering if there was an easier way to get all related FK objects from other objects. For example, with a group object, is there a built in method to get the user object of the cre...
in symfony i call an action and i want this to return json to jquery frontend.
the jobeet tutorial teaches how to return a partial but i want to return json, not a partial.
thanks.
...