0

How do I use Doctrine in Symfony to get page title from a table of pages?

For example:

$title = Doctrine::getTable('MyTable')->getTitle($this->page_id);
4

1 回答 1

2

您需要抓住对象,然后从中拉出标题。

尝试:

$object = Doctrine::getTable('MyTable')->find($this->page_id);
$title = $object->getTitle();
于 2012-07-09T17:38:41.550 回答