symfony1


What is correctness in symfony to fill a form in two steps?

青春壹個敷衍的年華 提交于 2020-01-17 03:26:08
问题 Hy, What is correctness in symfony to fill a form in two steps? Imagine that we have a entity called Enterprise and we want to create a form with only required fields and another form, that when the user login can fill the other non-required fields. How is the correctness form? Now i have a form to registration ('lib/form/doctrine/EnterpriseForm.class.php') and another ('lib/form/doctrine/EnterpriseCompleteForm.class.php').In every class we set labels, validators, ... but the problem is in

How to use Stored Procedures with Symfony and Doctrine

放肆的年华 提交于 2020-01-14 08:41:27
问题 I having problems at trying to call a MySQL Stored Procedure with Symfony 1.4 and Doctrine 1.2. What I want to do is the following: In a module/new after typing all the data in the form, I want to insert one of the values in another table. I don't know if this can be done with Doctrine without using a stored procedure. Thanks for your help. 回答1: You could use triggers but I'm not sure how advanced they are in MySQL. Triggers wouldn't involve any coding in Doctrine, symfony nor PHP. Just

How to allow certain HTML tags in a form field in Symfony 1.2

牧云@^-^@ 提交于 2020-01-14 06:05:11
问题 I'm playing around with Symfony and have encountered a road block. I created a model "CmsPage" which has a field called "content" which is stored as a clob (this is specific to doctrine I believe). When I created the app I set "--escaping-strategy=on" so if I enter any html when editing a CmsPage that gets encoded with html entities or something along those lines. I would like to allow html in this field and a quick googling hasn't helped much. Maybe I'm searching for the wrong terms. Anywho

mysql inserting records twice in database

喜欢而已 提交于 2020-01-14 04:52:28
问题 I have the simple code shown below. After it has run once, it inserts the results into MySQL database twice. It is working fine in all browsers (IE, Chrome, and Safari) except Firefox. I am using symfony php framework and propel as the ORM. $con = Propel::getConnection(); $sql = "select * from tmp where user_id =$userid"; $stmt = $con->prepare($sql); $stmt->execute(); while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $insert_sql = "INSERT IGNORE into library(xxx,xxx) VALUES('xyz','xys')";

sfErrorNotifierPlugin on symfony task

你。 提交于 2020-01-14 04:03:08
问题 My application runs huge batch processing inside a Symfony task, and I want to be notified about all PHP errors and uncaught exceptions. So I tried sfErrorNotifierPlugin, and it works great in a web context (accessing the application from the browser); the problem is that I can't make it work on my symfony tasks. Is there any way to make it work in tasks? 回答1: sfTask has no exception handling like the web interface does, but you can work around it: ultimately exceptions thrown are passed to

Django-like framework on Ruby?

喜你入骨 提交于 2020-01-13 11:06:52
问题 Django as a framework is a neat little package. There are very few files (compared to Rails) and it's got a clean structure. The fact that you can plug and unplug apps between different projects is an extremely nifty feature. At the same time, Ruby's hacking ability is unparalleled. It's complete object-orientedness makes it more expressive and fun. To cut the story short, is there a Django-like or Django inspired framework on Ruby? If not, would be possible for an implementation of Django on

Symfony as a helper for Wordpress plugin development

依然范特西╮ 提交于 2020-01-12 22:55:06
问题 I have seen several integrations between wordpress and symfony, but they are made with the goal of managins static pages content inside wordpress and symfony acting as the controller. Wordpress plugin development api seems really basic and primitive and you have no way o code with the MVC pattern out of the box. So the big question is, what would be an starting point to create plugins in wordpress, and create admin sections in it, but using Symfony power to manage database access, form

Symfony as a helper for Wordpress plugin development

若如初见. 提交于 2020-01-12 22:54:12
问题 I have seen several integrations between wordpress and symfony, but they are made with the goal of managins static pages content inside wordpress and symfony acting as the controller. Wordpress plugin development api seems really basic and primitive and you have no way o code with the MVC pattern out of the box. So the big question is, what would be an starting point to create plugins in wordpress, and create admin sections in it, but using Symfony power to manage database access, form

500 internal server Symfony on production, possibly due to PHPsuexec

痴心易碎 提交于 2020-01-11 11:57:12
问题 Running into a 500 internal server error on my subdomain installation of Symfony when I attempt to visit any modules. The server does have PHPsuexec installed on it. Does anybody know whats up? Otherwise it states that the symfony project is installed and it runs fine on my server. One glitch could be that on my server the directories have permissions 777 and all files have 666 permissions. However, courtesy of PHPsuexec, most my directories seem to have 775 and the files a 664 permission

How to catch an id from sfUser?

六月ゝ 毕业季﹏ 提交于 2020-01-11 10:48:07
问题 I'm working with symfony 1.4 & i use sfDoctrineGuardPlugin as a tool for authentifications. I want to catch the Id of user in order te store it in my table. After a small research, I guess I have to use that expression : getUser()->getGuardUser()->getId() . What i looking for is how to invest that expression for my target. 回答1: if the user is authenticated, yes, you can use: // inside an action $id = $this->getUser()->getGuardUser()->getId(); // inside a template $id = $sf_user->getGuardUser(

工具导航Map