Re: [symfony-users] Re: Helpers and Widgets??

2010-01-08 Thread Eno
On Fri, 8 Jan 2010, wueb wrote:

> The problem are the timelines. :(

You probably spend the same amount of time posting to this list and 
checking for replies - those 30 mins could easily be spent reading.




-- 


-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Re: Helpers and Widgets??

2010-01-08 Thread Alexandru-Emil Lupu
ASK your PM to give you a daily task for 30 minutes research (time when you
study) ... Or read from you home ... 30 minutes is not much, but will keep
you on track.
If your PM would not understand the need of change / study / learn, then i
can recommend you two things: Change your job, or Change your job.

On Fri, Jan 8, 2010 at 12:04 PM, wueb  wrote:

> The problem are the timelines. :(
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>
>


-- 
Have a nice day!
Alecs

As programmers create bigger & better idiot proof programs, so the universe
creates bigger & better idiots!
I am on web:  http://www.alecslupu.ro/
I am on twitter: http://twitter.com/alecslupu
I am on linkedIn: http://www.linkedin.com/in/alecslupu
Tel: (+4)0748.543.798
-- 

You received this message because you are subscribed to the Google Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Helpers and Widgets??

2010-01-08 Thread wueb
The problem are the timelines. :(
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Re: Helpers and Widgets??

2010-01-07 Thread Alexandru-Emil Lupu
You don't time to learn?! Sorry for asking ... what it does the difference
between you and concurency.

I could bet that you lost few minutes trying that construct problem. Few
minutes a day would help you out. You are not doing this for me or
comunity... but yourself.

sent via htc magic

On Jan 8, 2010 7:12 AM, "Eno"  wrote:

On Thu, 7 Jan 2010, wueb wrote: > I know i should look better to OOP in
PHP5, but unfortunally i do...
In fact, you probably should read the symfony docs too.



--



--
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en.
-- 

You received this message because you are subscribed to the Google Groups "symfony users" group.

To post to this group, send email to symfony-us...@googlegroups.com.

To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: Helpers and Widgets??

2010-01-07 Thread Eno
On Thu, 7 Jan 2010, wueb wrote:

> I know i should look better to OOP in PHP5, but unfortunally i don't
> have a lot of time to do it :(

In fact, you probably should read the symfony docs too.



-- 


-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Helpers and Widgets??

2010-01-07 Thread wueb
Thanks Daniel. ;)

I know i should look better to OOP in PHP5, but unfortunally i don't
have a lot of time to do it :(
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Re: Helpers and Widgets??

2010-01-07 Thread Daniel Lohse
Hey there!

class ...Form extends Base...Form
{
protected $user_id;

public function __construct($user_id, $object = null, $options = 
array(), $CSRFSecret = null)
{
$this->user_id = $user_id;
parent::__construct(object, $options, $CSRFSecret);
}

public function configure()
{
// this method should already be available
// here you can use $this->user_id;
}
}

Cheers, Daniel

PS: If you don't know that as of PHP5 the constructor is __construct() you 
should look at general OOP in PHP5 before turning to symfony!

On Jan 7, 2010, at 4:05 PM, wueb wrote:

> When i try override the constructor (don't know what is the correct,
> if  "public function construct()" or "public function CrmEmpresasForm
> ()", but i try both) it send me an error:
> 
> Fatal error: Call to a member function getStylesheets() on a non-
> object in D:\wamp\www\dev\sfprojects\project\lib\vendor\symfony\lib
> \form\sfForm.class.php on line 723
> 
> You know what can be?
> -- 
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Helpers and Widgets??

2010-01-07 Thread wueb
When i try override the constructor (don't know what is the correct,
if  "public function construct()" or "public function CrmEmpresasForm
()", but i try both) it send me an error:

Fatal error: Call to a member function getStylesheets() on a non-
object in D:\wamp\www\dev\sfprojects\project\lib\vendor\symfony\lib
\form\sfForm.class.php on line 723

You know what can be?
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Re: Helpers and Widgets??

2010-01-07 Thread Daniel Lohse
Depends on where you get that id from?

$sf_user only exists in the template, use 
$this->getUser()->getGuardUser()->getId() in the action.

For CrmEmpresasForm to receive the user id and not use sfContext in the form 
(which is bad practice), you should override the constructor of the form and 
set the user id as a protected variable then call the parent constructor after 
that. You can then use this variable in the configure method.

Cheers, Daniel

On Jan 7, 2010, at 2:16 PM, wueb wrote:

> Thanks florian and daniel,
> 
> The problem is in some docs they only speak about helpers and in
> others only speak about widgets, that confused me.
> 
> @daniel - i started with symfony some weeks ago, but i'm still
> learning how to work on it. i already have the 1.3
> 
> 
> Other thing, can't we send parameters from the action to the form?
> Something like this to have the id from the user:
> 
> public function executeNew(sfWebRequest $request){
>$this->form = new CrmEmpresasForm($sf_user->getId(););
> }
> 
> Is possible?
> -- 
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Helpers and Widgets??

2010-01-07 Thread wueb
Thanks florian and daniel,

The problem is in some docs they only speak about helpers and in
others only speak about widgets, that confused me.

@daniel - i started with symfony some weeks ago, but i'm still
learning how to work on it. i already have the 1.3


Other thing, can't we send parameters from the action to the form?
Something like this to have the id from the user:

public function executeNew(sfWebRequest $request){
$this->form = new CrmEmpresasForm($sf_user->getId(););
}

Is possible?
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Helpers and Widgets??

2010-01-07 Thread Florian
yes, it is exactly like you say :




or

renderLabel() ?>
renderError() ?>
render() ?>

You should read this :

http://www.symfony-project.org/forms/1_2/en/

On 7 jan, 14:01, wueb  wrote:
> So should i just use for example the widget->render instead of a
> input_tag('column'), something like that?
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Re: Helpers and Widgets??

2010-01-07 Thread Daniel Lohse
Kind of. Just read the docs, there's plenty on how to do forms in symfony with 
the new form framework.

echo $form['column'];

is sufficient in your templates. Did you just start using symfony?

Or did you start with symfony 1.0? Then I'd highly suggest going through Jobeet 
chapter after chapter, but especially this:

http://www.symfony-project.org/jobeet/1_4/Doctrine/en/10


Cheers, Daniel

On Jan 7, 2010, at 2:01 PM, wueb wrote:

> So should i just use for example the widget->render instead of a
> input_tag('column'), something like that?
> -- 
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Helpers and Widgets??

2010-01-07 Thread wueb
So should i just use for example the widget->render instead of a
input_tag('column') on the template, something like that?
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Helpers and Widgets??

2010-01-07 Thread wueb
So should i just use for example the widget->render instead of a
input_tag('column'), something like that?
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.