public function __invoke(User $user) { $escaper = $this->getView()->plugin('escapehtml'); $url = $this->getView()->plugin('url'); $href = $url('user/view', array('id' => $user->getId())); $name = $escaper($user->getFullName()); return sprintf('<a class="user-view" href="%s">%s</a>', $href, $name); }
/** * {@inheritDoc} */ public function getFullName() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getFullName', array()); return parent::getFullName(); }