Yes, but only if you (a) inject the headTitle helper into your
controller, and/or (b) inject the view helper plugin manager into your
controller, and/or (c) cheat, and pull (b) from the composed service
locator.
For (c):
$headTitle =
$this->getServiceLocator()->get('ViewHelperManager')->get('HeadTitle');
(a) is more programmatically correct, as it conforms better to
separation of concerns, inversion of control, etc. To do that, you'd
need to create a factory for your controller:
function ($controllers) {
$services = $controllers->getServiceLocator();
$helpers = $services->get('ViewHelperManager');
$helper = $helpers->get('HeadTitle');
$controller = new MyController($helper);
return $controller;
}
On Fri, Aug 9, 2013 at 4:31 PM, zamanphp <[email protected]> wrote:
>
>
>
>
> --
> View this message in context:
> http://zend-framework-community.634137.n4.nabble.com/is-possoble-access-to-value-of-headTitle-in-my-controller-tp4660739.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
> --
> List: [email protected]
> Info: http://framework.zend.com/archives
> Unsubscribe: [email protected]
>
>
--
Matthew Weier O'Phinney
Project Lead | [email protected]
Zend Framework | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]