silverstripe-comments/code/extensions/ContentControllerCommentsExtension.php
Will Rossiter 877537c284 FIX: resolve Controller not failing over to an extension method (Fixes #76)
Currently an issue exists that when a controller calls a method which exists on an extension (i.e Comments()) it incorrectly classed as a relation instead of a method resulting in a SQL error.

This patch works around that issue by directly invoking the method.
2013-11-28 21:28:09 +13:00

11 lines
183 B
PHP

<?php
/**
* @package comments
*/
class ContentControllerCommentsExtension extends Extension {
public function Comments() {
return $this->owner->dataRecord->getComments();
}
}