symfony1

Checkboxes are not checked

雨燕双飞 提交于 2019-12-12 01:50:03
问题 I cannot get DB values of games to be selected: Game: actAs: Timestampable: ~ columns: id: { type: integer(4), primary: true, autoincrement: true, unsigned: true } game_name: { type: string(100), notnull: true } logo: { type: string(100), notnull: true, comment: "Game Logo" } indexes: it: fields: game_name type: unique Campaign: actAs: Timestampable: ~ columns: id: { type: integer(4), primary: true, autoincrement: true, unsigned: true } name: { type: string(100), notnull: true } percentage: {

Symfony 1.4 - are forms always in <table>?

空扰寡人 提交于 2019-12-12 01:08:32
问题 I'm using sfDoctrineAllowPlugin. I need form which has Twitter's Bootstrap semantics. I looked into template and I found, that there is only $form , which is a <table> . How can I format it in my way? I don't want to use table, rows and cols. 回答1: There are plenty of render* functions available to display each item in your form. renderRow renderLabel render renderError etc ... But you can also define a decorator (a custom sfWidgetFormSchemaFormatter ) for your form to define the way each item

Doctrine_Record_Exception “Couldn't call Doctrine_Core::set()” while try to save form data

断了今生、忘了曾经 提交于 2019-12-12 01:08:19
问题 I'm having this issue and I can't find what is wrong. I'm trying to update object before execute the form save method and I do as follow (I wrote the whole class just in case): class SdrivingMaquinaForm extends BaseSdrivingMaquinaForm { protected $current_user; public function configure() { $this->current_user = sfContext::getInstance()->getUser()->getGuardUser(); unset($this['updated_at'], $this['created_at']); $this->widgetSchema['idempresa'] = new sfWidgetFormInputHidden(); $id_empresa =

How to do Password Reset in Symfony 1.4 ? (Without using a plugin)

谁都会走 提交于 2019-12-12 01:05:34
问题 I want to add a Reset Password option for my User login module. So I've followed Askeet Tutorial (symfony 1.0). But I'm getting errors when I click forgot password it redirect to "Password request Action" with this error: Fatal error: Call to undefined function input_tag() , submit_tag, form_error() Why am I getting erros for those keywords? Is that mean those are not compatible with my symfony version (i'm using symfony 1.4, tutorial is for symfony 1.0) OR Can any one suggest me any other

Secure Url with mod_rewrite and symfony

故事扮演 提交于 2019-12-11 23:48:55
问题 I have few pages which need to be secured through mod_rewrite and the code is based on mvc architecture Let me say I have a page login its url is http://www.example.com/login it needs to be redirected to https://www.example.com/login If any url other than desired secured url uses https we need to change it to http for example https://www.example.com/sitemap must be redirected to http://www.example.com/sitemap I am using the following code in .htaccess RewriteCond %{SERVER_PORT} !^443$

Mobile version of my Symfony project

£可爱£侵袭症+ 提交于 2019-12-11 23:40:00
问题 I am creating the mobile version in a symfony project and I am using the technique described here: http://symfony.com/blog/how-to-create-an-optimized-version-of-your-website-for-the-iphone-in-symfony-1-1 So far it is working, but I have one problem: Most of my standard pages are perfectly valid to browse with a mobile phone but symfony forces me to create the *Success.mobile.php templates... I would like symfony to use the normal template if it does not find the .mobile.php one. Is that

Long script in admin, task in Symfony?

醉酒当歌 提交于 2019-12-11 23:30:06
问题 In the admin panel, when the admin selects an action it will load data from an API and save it to the DB. It could take from 2 seconds to 3 minutes, depending on what he is importing. How can I do in Symfony to create like a thread, so the admin is not waiting to finish. And when it's finished tell him to check the result? Are the tasks the answer for this problem? thanks! 回答1: Not symfony-specific, but you'll want to kick off some background process. I'm not familiar with symfony's tooling

custom route for doctrine nestedSet

我怕爱的太早我们不能终老 提交于 2019-12-11 23:24:07
问题 I have been able to to successfully display all the nodes in a nice tree on the frontend, but the problem comes with rendering of the actual pages. So I have 2 parents, Dog and Cat , and withing them I have multiple child nodes. I have created a frontend module named animals that has an empty indexSuccess.php file. In my actions.class.php file i have: $this->animal = AnimalTable::getAnimalBySlug($request->getParameter('slug')); In my Animal model public static function getAnimalBySlug($slug)

a good tutorial for .Net development with MVC, spring.net and NHibernate [closed]

时光总嘲笑我的痴心妄想 提交于 2019-12-11 23:04:41
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm coming from a php world and am now initaiting a project in .NET environment. After looking around, I noticed that the combination of MVC, spring.net and NHibernate might work for me. In PHP I created applications using Symfony (with propel or doctrine) that combined all these in one framework. The Jobeet

Symfony web debug tool bar disappears when using sfNoLogger

自闭症网瘾萝莉.ら 提交于 2019-12-11 20:34:08
问题 Why does the web debug tool bar disappear when I use sfNoLogger in the factories.yml: dev: logger: class: sfNoLogger param: level: err loggers: ~ When I remove these lines the tool bar appears. 回答1: Because the sf*No*Logger does not log anything. It's usually used for production. 来源: https://stackoverflow.com/questions/5119955/symfony-web-debug-tool-bar-disappears-when-using-sfnologger