本文整理汇总了PHP中Concrete\Core\Block\BlockController::runAction方法的典型用法代码示例。如果您正苦于以下问题:PHP BlockController::runAction方法的具体用法?PHP BlockController::runAction怎么用?PHP BlockController::runAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Concrete\Core\Block\BlockController
的用法示例。
在下文中一共展示了BlockController::runAction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: runAction
public function runAction($method, $parameters = array())
{
if (in_array($method, array('add', 'edit'))) {
parent::runAction($method, $parameters);
return;
}
$controller = $this->getController();
if ($controller) {
$controller->runAction($method, $parameters);
foreach ($controller->getSets() as $key => $value) {
$this->set($key, $value);
}
}
}
示例2: deliverResponse
protected function deliverResponse(BlockController $controller, $action)
{
list($method, $parameters) = $controller->getPassThruActionAndParameters(array($action));
if ($controller->isValidControllerTask($method, $parameters)) {
$controller->on_start();
$response = $controller->runAction($method, $parameters);
if ($response instanceof \Symfony\Component\HttpFoundation\Response) {
return $response;
} else {
$r = new Response($response);
return $r;
}
}
$response = new Response(t('Access Denied'));
return $response;
}
示例3: runAction
public function runAction($action, $parameters = array())
{
parent::runAction($action, $parameters);
// handles on_page_view
$b = $this->findBlockForAction($action, $parameters);
if (empty($b)) {
return;
}
$controller = $b->getController();
return $controller->runAction($action, $parameters);
}