2008年10月18日星期六

Re: [fw-mvc] Creating a Zend_Dojo_View_Helper

-- Daniel Skinner <skinner@destiny-denied.co.uk> wrote
(on Saturday, 18 October 2008, 07:04 PM +0100):
> Ok. Tooltip should be quite simple. Take a look at one of the current dijit
> implementations:
>
> class Zend_Dojo_View_Helper_Textarea extends Zend_Dojo_View_Helper_Dijit
> {
> protected $_dijit = 'dijit.form.Textarea';
>
> protected $_module = 'dijit.form.Textarea';
>
> public function textarea($id, $value = null, array $params = array(), array
> $attribs = array())
> {
> ...
> }
> }
>
> So, with absolutely no pre-thought to if this will actually work, I would start
> out with:
>
> class My_Dojo_View_Helper_Tooltip extends Zend_Dojo_View_Helper_Dijit
> {
> protected $_dijit = 'dijit.Tooltip';
>
> protected $_module = 'dijit.Tooltip';
>
> public function tooltip($id, $value = null, array $params = array(), array
> $attribs = array())
> {
> $attribs = $this->_prepareDijit($attribs, $params, null);
> /* Output div dojoType="dijit.Tooltip" markup here only if use
> declarative */
> }
> }


That's about the long and short of it. I invite you to open a feature
request to add this and attach it as a patch. :)


> Steven wrote:
>
> I wasnt thinking of anything that ambitious - I don't really know alot
> about JavaScript hence my interest in ZFs Dojo implementation.
>
> I was hoping to implement digit.tooltip, dojox.analytics - and maybe some
> type of carousell.
>
> Steve
>
> On Sat, Oct 18, 2008 at 5:51 PM, Daniel Skinner <
> skinner@destiny-denied.co.uk> wrote:
>
> What dijits are you looking to implement specifically?
>
> Take a look at Zend_Dojo_View_Helper_Dijit. This is the base class you
> will be extending from.
>
> A few of us are in the early states of proposing dijit.Tree, dojo(X)
> data stores and DnD components. Let us know if that compliments your
> interests.
>
> Daniel
>
>
> Steven wrote:
>
> Hi there,
>
> I'm not that familiar with Dojo but would like to implement View
> Helpers for some of the other Dijits not currently included with ZF
> - however the manual doesn't really outline the specifics for doing
> so. Can anyone help me out?
>
> Cheers
>
> Steve
>
>
>
>
>

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: