Hi,
after installing sfDoctrineApplyPlugin-1.1.1, extracting Zend at
lib/vendor/Zend, executing sfApply/apply and submitting the form that
appears i get this errror:
Warning:
include_once(Zend/Loader/Autoloader.php)
[function.include-once]: failed to
open stream: No such file or directory
in
/home/ptiteshina/workspace/sfpr...
I have added an index on a table just to ensure that a set of fields together form a composite unique key (Is this approach correct? or is there a better option with Doctrine?)
After having done that, when I try to save an object and the unique constraint fails, a SQL exception is generated. What is the best way to handle this? and to d...
Hello,
I want to know how I can make a validator for a key which must be unique.
...
Hi
I'm using PHP 5.3's class_alias to help process my Symfony 1.4 (Doctrine) forms. I use a single action to process multiple form pages but using a switch statement to choose a Form Class to use.
public function executeEdit(sfWebRequest $request) {
switch($request->getParameter('page')) {
case 'page-1':
class_alias('MyFor...
I'm working on a solution that has two applications
1) Wordpress based CRM (frontend)
2) Symfony based b2c application
Symfony application is created and working fine. When we login to symfony based application, the top menu changes with respect to person logs in. e.g. sign-in changes sign-out etc.
The thing is we need to have this s...
I've been reading some Symfony documentation regarding validation/error-handling for controllers.
http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer
Validation and Error-Handling Methods (just over 2 thirds down)
I like the idea of a function automatically being called - validateMyAction before executeMyAction is c...
When I run my functional tests through Symfony, the uploaded file is not being supplied with a mime type.
My test case shows:
$browser->info('1 - Test Upload Form')->
get('/formpage')->
setField('myform[file]', sfConfig::get('sf_upload_dir').'/example.doc')->
click('input[type=submit]')->
end
;
And is executed on the command ...
Hello,
I have to generate a PDF with TCPDF, my information come from my database, so I have to write PHP variables. I know how to do.
But I want to write CSS + xHTML (as an example I have seen of TCPDF site) using :
$html = <<<EOF
<style>
<!-- My CSS -->
</style>
<!-- My xHTML -->
EOF;
$pdf->writeHTML('$html', '');
I have er...
Hello,
I try to make a PDF writing CSS and HTML but my CSS doesn't appear in my PDF. The only thing considered is the font-size and font-color.
I give you the code (sorry, it's a little long...)
$config = sfTCPDFPluginConfigHandler::loadConfig('my_config');
$doc_title = "Fiche Logement";
$html = <<<EOF
<style>
.in...
Hi all,
A quick question. I have a symfony form. When I save the form, I want my created_by field to be set automatically on save.
So, i'm passing the current user id as an option in the form:
$this->form = new ContractForm(null,array("created_by"=>$this->getUser()->getId()));
And in the configure method of the form class I have:
$...
Hello everyone,
i've 2 connections in my databases.yml file, one contains the whole i18n Stuff for the project, the other one regular application Data which shall be erased from time to time during development.
What i'm looking for is a way to keep the database with my i18n Data untouched during build, while the other one gets's droppe...
Hello to all
I try to make a form a little complicated under symfony.
here is my schema
mails( @idC: integer, date_arr: date, objet: string )
mail_service( #idC: integer , #@noms: string )
services( @noms: string, nomg: string )
(@x...x = primary key)
(#x...x = foreign key)
les regles
# A mail can be intended for one or several s...
I'm rendering a partial from inside a task in symfony 1.4.6...
$this->configuration = $this->createConfiguration(app, env, false);
$this->configuration->loadHelpers(array('Partial'));
$context = sfContext::createInstance($this->configuration);
$html = get_partial(partialName, params);
...Inside the partial there is a reference to a c...
Hello,
I want to test if an object is deleted after a calling to my function executeDelete in order to send to the user an error if the object is still in my database.
if ($logement->isDeleted()) {
$this->getUser()->setFlash('notice', 'Suppression du logement effectuée');
}
else {
$this->getUser()->setFlash('error', 'Erreur lors de...
Hello,
When I want to create a new object with one of my form, Doctrine take me an error :
Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'
Creating worked previously, but I don't know what I have change to have an error now.
My schema for ID :
Logement:
connection: doctrine
actAs: [Timestampable]
ta...
Hi,
Can someone explain to me why the following code isn't outputting anything in a component? Does the response object in a component behave differently from that in an action (since the code works as part of an action)?
I am using Symfony 1.4.
$this->getResponse()->setContent("OK");
Code block:
class merchantComponents extends s...
Hello,
I want to know how I can optimize my Doctrine queries because some of my queries are too long.
I don't want a method particularly to my querie, but common methods I can apply to all requests, because I don't find information about this.
...
Hey guys, I'm writing a library that will reside in the /lib folder that deals with processing a credit/debit card transaction.
I'm using the Forms framework to accept and validate the card details and then from my actions.class.php for that module, it instantiates my custom library that deals with the SOAP call to process the transacti...
I am attempting to send an HTML email from a symfony (1.4.6) task, I don't want to send the entire rendered HTML output from a particular module/action, so I am rendering a partial. That's all fine, the issue is that the partial contains CSS references.
Is there a nice 'symfonic' way of including a CSS file in an HTML email from a symfo...
I have created a custom task in symfony (1.3.6), running on Ubuntu 10.0.4.
I am generating urls in the task. This is a snippet of some of my code:
// In the custom task (lib/task/mySomethingSomethingTask.php)
protected function execute($arguments = array(), $options = array())
{
//create a context
$app = sfProjectConfigura...