This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Symfony 1.4 with Doctrine object issue

Discussion relating to version 1.3.x and 1.4.x

Symfony 1.4 with Doctrine object issue

by dev_008 » Sun Jun 22, 2014 5:53 am

Hi i'm new to symfony 1.4 and these days i'm learning it.I did successfully installation and controller and view configuration.As well as i could display a symfony form with validations.And then i configured doctrine models in my symfony app.After that i created custom functions in models class also.But i don't know how to display model data on view through the controller.But i tried to do in the way we're normally doing in MVC applications.I went through the symfony handbook too.But still no luck.So please can someone help me to solve this?

My model class

Code: Select all
class Car extends BaseCar
{
   
    public function getname()
    {
        return $this->getCarname();
    }
   
}


Controller

Code: Select all
class car_loginActions extends sfActions
{
 
  public function executeIndex(sfWebRequest $request)
  {
      $car=new Car();
      $carname=$car->getname();
      $this->data=$carname;
   
  }
 
}


View

Code: Select all
<?php echo $data;?>
dev_008
Junior Member
 
Posts: 2
Joined: Sun Jun 22, 2014 5:46 am