From 98b7b7be3f9e4383f6f912593e8c72a6b117dafc Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 21 Mar 2016 12:12:33 +0100 Subject: [PATCH] ActionController: commit missing helper method --- library/Director/Web/Controller/ActionController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/Director/Web/Controller/ActionController.php b/library/Director/Web/Controller/ActionController.php index 21fa6e88..f2b18083 100644 --- a/library/Director/Web/Controller/ActionController.php +++ b/library/Director/Web/Controller/ActionController.php @@ -171,6 +171,14 @@ abstract class ActionController extends Controller return $this; } + protected function shorten($string, $length) + { + if (strlen($string) > $length) { + return substr($string, 0, $length) . '...'; + } + return $string; + } + protected function setViewScript($name) { $this->_helper->viewRenderer->setNoController(true);