ZF-4636: Zend_Dojo_View_Helper_Tooltip
Description
A new view helper for dijit.Tooltip:
class Zend_View_Helper_Tooltip extends Zend_Dojo_View_Helper_Dijit { protected $_dijit = 'dijit.Tooltip';
protected $_module = 'dijit.Tooltip';
public function tooltip($id, $params = array(), array $attribs = array()) { if (!isset($attribs['id']) $attribs['id'] = $id; $attribs = $this->_prepareDijit($attribs, $params, null); //see [1] $html = '
_htmlAttribs($attribs) . '>
\n";
return $html;
} }
[1] note here $type param set to null. Could equally be set to tooltip if custom behaviour is required within _prepareDijit()
/* and in your view scripts */
<?php echo $this->tooltip('test', array( 'connectId' => 'username', 'label' => 'My Tooltip', )); ?>A few concerns:
- The div markup still needs to be created and returned even when using programmatic otherwise the main dojo helper will not attach the params.
Comments
No comments to display