You can have another layer of business logic classes that you store in
lib/ which interact with your
models directly.
gabriel
On Oct 6, 7:24 am, Sebastien Armand [Pink] khe...@gmail.com wrote:
Most of the times in symfony applications, we'll have a model let's say it's
'Product' and then
if (sfContext::getInstance()-getConfiguration()-getApplication() ==
'backend) {
$this-widgetSchema['payment_type_id'] = new
sfWidgetFormSelect(array('choices' = $choices));
} else {
$this-widgetSchema['payment_type_id'] = new
class WebModelClass extends ModelClass
{
public function __toString()
{
return this-getUrl();
}
public function getUrl()
{
return Whatever I decide to do to generate URL here!;
}
public function initialiseForm()
{
//Whatever I want to do to initialise the correct form
If you want a module not bound to a model class then you use:
symfony generate:module [application] [newmodulename]
which will create:
application
-- modules
-- newmodulename
-- actions
actions.class.php
-- templates
indexSuccess.php
If however you want to
Use virtual hosts on your apache installation. You can essentially set
apache up on your local machine so that if you request a certain URL it will
load the local version of it instead.
There is ample documentation in the symfony books about this, so I don't
think I need to explain every step.
What you are asking are basic skills involved in web development, and not
anything related to symfony specifically. Therefore there are many ways to
skin this cat:
1. How about instead of storing Foo Bar FooBar store Foobr /Barbr
/FooBarbr /
2. In your template file you can use:
?php echo
I assume that $Sedi18ns is a result from a doSelect call?
If so, this means that items are stored in an array. Therefore in your
TEMPLATE file:
?php foreach ($Sedi18ns as $SediObj): ?
?php echo $Sedi
Hang on, I have answered enough of these Every one of your questions
are answered in
http://www.symfony-project.org/gentle-introduction/1_4/en/
On Wed, Oct 6, 2010 at 12:35 PM, Javier Garci tirengar...@gmail.com wrote:
Hi,
i have this schema and fixtures:
sedi:
_attributes: { isI18N: true, i18nTable: sediI18n }
id: ~
sediI18n:
id: {
Your schema file is malformatted probably an extra space somewhere that
shouldnt be there or some other error:
http://www.symfony-project.org/gentle-introduction/1_4/en/
On Tue, Oct 5, 2010 at 10:26 PM, Javier Garcia tirengar...@gmail.comwrote:
Hi,
i have just installed symfony, created a
http://www.symfony-project.org/gentle-introduction/1_4/en/
On Wed, Oct 6, 2010 at 9:01 PM, Javier Garci tirengar...@gmail.com wrote:
Hi,
i have followed the steps to create a i18n table:
http://www.symfony-project.org/jobeet/1_4/Propel/en/19#chapter_19_sub_propel_objects
But when i try
Hi Gareth,
Im not using foreach(), jut i'm trying to use just prev() method.
Javier
On Oct 7, 11:43 am, Gareth McCumskey gmccums...@gmail.com wrote:
I assume that $Sedi18ns is a result from a doSelect call?
If so, this means that items are stored in an array. Therefore in your
TEMPLATE
Thats the problem. You need to use foreach cos there IS NO prev() method.
again ... http://www.symfony-project.org/gentle-introduction/1_4/en/
On Thu, Oct 7, 2010 at 1:47 PM, Javier Garcia tirengar...@gmail.com wrote:
Hi Gareth,
Im not using foreach(), jut i'm trying to use just prev()
I rather prefer to compose than to subclass here.
class ProductView
{
public function __construct(Product $product)
{
$this-product = $product;
}
public function setSelected($selected)...
public function getUrl()...
etc.
}
Bernhard
--
If you want to report a vulnerability
Is there a way to clear my cache in an action, using PHP?
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send
2010/10/7 HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com:
Is there a way to clear my cache in an action, using PHP?
$cacheManager = sfContext::getInstance()-getViewCacheManager();
if ($cacheManager) {
$cacheManager-remove('blog/index?username='.$username.'sf_format=html');
On Thu, 7 Oct 2010, [ISO-8859-2] Micha³ Piotrowski wrote:
2010/10/7 HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com:
Is there a way to clear my cache in an action, using PHP?
$cacheManager = sfContext::getInstance()-getViewCacheManager();
if ($cacheManager) {
Hello,
I'm looking for a simple plugin (SF 1.4 / Doctrine) which allows to ;
- send a private message to a sfDoctrineGuardUser via a send a
private message link
- send a mail to the user each time a private message is sent
- possibility to reply / check the private mailbox
I've been searching
I receive this the error when i trying to install a plugin, i add the
pear channel on my loaclhost but nothing
Unable to initialize channel Unknown channel: plugins.symfony-
project.org (use --force-license to force installation)
--
If you want to report a vulnerability issue on symfony,
Christian wrote, On 10/7/10 5:46 AM:
if (sfContext::getInstance()-getConfiguration()-getApplication() ==
'backend) {
$this-widgetSchema['payment_type_id'] = new
sfWidgetFormSelect(array('choices' = $choices));
} else {
This approach makes your form untestable.
I'd suggest following scenario instead:
.
if ($this-getOption('is_backend', false) == false) {
$this-widgetSchema['payment_type_id'] =
new sfWidgetFormSelect(array('choices' = $choices));
} else {
$this-widgetSchema['payment_type_id'] =
new
Hi again,
I am back with another problem in the same form : I can't get a hidden
field to get initialized with a default value.
This is a portion of my code :
$this-setWidgets(array(
'object_id'= new sfWidgetFormPropelChoice(
array('model' = 'BioObject', 'add_empty'
Bunch of nice ideas here! Gotta find how to make my own sauce now!
On Thu, Oct 7, 2010 at 9:40 PM, Bernhard Schussek bschus...@gmail.comwrote:
I rather prefer to compose than to subclass here.
class ProductView
{
public function __construct(Product $product)
{
$this-product =
Hi everyone,
I'm faced with the current issue: the number of modules that I have is
constantly growing! So is the number of model classes etc...
For model classes, Doctrine provides the notion of packages that I can use
to group some classes together. So this is not a problem.
When it comes to
23 matches
Mail list logo