开发者

modified executeIndex in IndexSucces?

开发者 https://www.devze.com 2023-03-10 23:53 出处:网络
i have public function executeIndex(sfWebRequest $request) { $this->plans = Doctrine_Core::getTable(\'Messages\')

i have

public function executeIndex(sfWebRequest $request)
{
  $this->plans = Doctrine_Core::getTable('Messages')
    ->createQuery('a')
    ->execute();
}

I can add ->limit(5); and how can i this make in indexSuccess.php? for 开发者_Python百科example i add:

<input type="text" id="limit">

<?php foreach ($messages as $i => $message): ?>
   echo $message->getId();
<?php endforeach; ?>

how to send data directly to executeNew?


if you define the property correctly in the action you can use it in the view:

public function executeIndex() {
   $this->messages = // whatever way you fetch the data
} 

in the view you can now use the $messages variable.

Is this what you are trying to accomplish?

0

精彩评论

暂无评论...
验证码 换一张
取 消