1
0

Added (CustomCode) Blogpost 'BFJoustBot'

This commit is contained in:
2014-09-29 22:10:59 +02:00
parent 0fec5bc9b6
commit b2caa78e07
8 changed files with 1216 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ class BlogPostController extends MSController
* @param integer $id the ID of the model to be displayed
* @throws CHttpException if Enabled is false
*/
public function actionView($id) //TODO-MS add BFJoust to Blog
public function actionView($id)
{
$model = $this->loadModel($id);
@@ -52,7 +52,7 @@ class BlogPostController extends MSController
if ($model->isSpecialBlogPost())
{
$controllerMethod = 'viewBlogpost' . $model->ControllerID;
if(is_callable([$this, $controllerMethod]))
if(method_exists($this, $controllerMethod))
$this->$controllerMethod($model);
else
throw new CHttpException(500, 'Unknown ControllerID: ' . $controllerMethod);
@@ -282,6 +282,18 @@ class BlogPostController extends MSController
]);
}
/**
* @param BlogPost $model
*/
protected function viewBlogpostBFJoustBot($model)
{
$this->render('view_BFJoustBot',
[
'model' => $model,
]);
}
//#########################################################################
//#########################################################################
}