Tag Archives for " symfony "

Symfony – send HTML mail from task with view partial

Do you need send mail from symfony task? No problem!Continue reading

Solution for sfForkedDoctrineApplyPlugin Unknown record property / related component “fullname” on “sfGuardUserProfile”

When I use sfForkedDoctrineApplyPluginon my page, after try create new account I got:

Unknown record property / related component “fullname” on “sfGuardUserProfile”

Solutions is easy… of course if you know it 😉Continue reading

How to change form input size in symfony forms?

Sometimes you need to change size (length) in html form elements input. In symfony you can do this in form configure function by using:Continue reading

How to remove form element label in symfony forms?

Sometimes you need remove label from forms in symfony. How to do this? Continue reading

How to set original filename in symfony file upload

When you upload files in symfony, then save filename will be random. If you want set to original filename add to model class (where you want to upload files):

public function generateYourColumnNameForStoreFileFileName($file)
{
return $file->getOriginalName();
}

where YourColumnNameForStoreFile it`s your column name.

If you want your uploaded files to stay with the original file name (which is not randomly generated by symfony), just add following lines to the model class you want to upload files:

public function generateXxxFileName($file)
{
  return $file->getOriginalName();
}

where Xxx is the name of the column that stores the filename in the database model related table.

How to logging in Symfony 1.x in Model, View and Controller

Sometimes you need to send something to symfony webdebug. there are three ways depended on  where you are going to log from.

Continue reading