本文整理汇总了PHP中LeftAndMain::getResponseNegotiator方法的典型用法代码示例。如果您正苦于以下问题:PHP LeftAndMain::getResponseNegotiator方法的具体用法?PHP LeftAndMain::getResponseNegotiator怎么用?PHP LeftAndMain::getResponseNegotiator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LeftAndMain
的用法示例。
在下文中一共展示了LeftAndMain::getResponseNegotiator方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getResponseNegotiator
public function getResponseNegotiator()
{
$negotiator = parent::getResponseNegotiator();
$controller = $this;
$negotiator->setCallback('ListViewForm', function () use(&$controller) {
return $controller->ListViewForm()->forTemplate()->RAW();
});
return $negotiator;
}
示例2: getResponseNegotiator
public function getResponseNegotiator()
{
$neg = parent::getResponseNegotiator();
$controller = $this;
$neg->setCallback('CurrentForm', function () use(&$controller) {
return $controller->renderWith($controller->getTemplatesWithSuffix('_Content'));
});
return $neg;
}
示例3: getResponseNegotiator
public function getResponseNegotiator()
{
$negotiator = parent::getResponseNegotiator();
$self = $this;
// Register a new callback
$negotiator->setCallback('SubsiteList', function () use(&$self) {
return $self->SubsiteList();
});
return $negotiator;
}
示例4: getResponseNegotiator
/**
* Gets the pjax response negotiator for this controller
* @return PjaxResponseNegotiator
*/
public function getResponseNegotiator()
{
if (!$this->responseNegotiator) {
parent::getResponseNegotiator();
$controller = $this;
$this->responseNegotiator->setCallback('LogEntries', function () use(&$controller) {
return $controller->renderWith('KapostBridgeLogViewer_LogsList');
});
}
return $this->responseNegotiator;
}
开发者ID:webbuilders-group,项目名称:silverstripe-kapost-bridge-logger,代码行数:15,代码来源:KapostBridgeLogViewer.php