Yii Framework Forum: Wywołanie rendera - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Wywołanie rendera Rate Topic: -----

#1 User is offline   Piotr 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 28-July 10

Posted 28 July 2010 - 10:39 AM

Siemanko. Pewnie błahe pytanie ale jest :) Mam kontroller:
<?php
class TestController
{
  public function actions()
  {
    return array(
      'edit' => 'application.....EditAction',
    )
  }
}
?>


no i w pliku EditAction.php chciałbym zrobić coś w stylu:
$this->render('edit');
ale oczywiście się nie da :) jak to uczynić? :)
0

#2 User is offline   aztech 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 206
  • Joined: 12-December 08
  • Location:Poland

Posted 29 July 2010 - 10:23 AM

Potrzebujesz wywołać w metodzie run() kontrolera następujący kod:
$this->getController()->render( 'path.to.view.file' , array( 'model' => $model ) );

I'm not complete idiot... some parts are missing!
0

#3 User is offline   jagutex 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 01-June 10
  • Location:Biskupice, Opole, Poland

Posted 01 September 2010 - 04:38 AM

Można również prościej:
$this->controller->render('edit');

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users