Issues

ZF-5711: extraPlugins it's also a jsonParam in the Zend_Dojo_View_Helper_Editor

Issue Type: Bug Created: 2009-02-06T18:43:30.000+0000 Last Updated: 2011-08-01T14:04:21.000+0000 Status: Resolved Fix version(s): - 1.11.8 (07/Jul/11)

Reporter: Mahomedalid Pacheco (mictlan) Assignee: Phellipe Kelbert (pkelbert) Tags: - Zend_Dojo

Related issues: Attachments: - Helper.diff

Description

In Zend_Dojo_View_Helper_Editor there is a protected property that handle (for the widget dijit.Editor) all the params (in this version captureEvents, events and plugins) that need to be parsed like JSON params in the generated zendDijits var, but a main property of the editor 'extraPlugins' doesn't appears.

Now:

protected $_jsonParams = array('captureEvents', 'events', 'plugins');

Expected:

protected $_jsonParams = array('captureEvents', 'events', 'plugins', 'extraPlugins');

Comments

Posted by Mahomedalid Pacheco (mictlan) on 2009-04-07T16:04:08.000+0000

Patch for this issue.

Posted by Kuba (stoosh) on 2009-10-27T03:54:47.000+0000

The patch doesn't fix the issue on 1.9.2

But one can always set the extraPlugins as a string and not array: 'extraPlugins' => '[\'foreColor\', \'hilteColor\', \'createLink\', \'insertImage\']',

Posted by Mahomedalid Pacheco (mictlan) on 2010-03-15T10:53:24.000+0000

Well, don't fix the issue because was uploaded by apr.

put the extraPlugins as a string it's a way but not the best. The patch it's really simple:

  • protected $_jsonParams = array('captureEvents', 'events', 'plugins');
  • protected $_jsonParams = array('captureEvents', 'events', 'plugins', 'extraPlugins');

Posted by Phellipe Kelbert (pkelbert) on 2011-06-27T20:00:59.000+0000

suggested test unit, based on testHelperShouldJsonifyPlugins():

<pre class="highlight">
public function testHelperShouldJsonifyExtraPlugins()
{
    $extraPlugins = array('copy', 'cut', 'paste');
    $html = $this->helper->editor('foo', '', array('extraPlugins' => $extraPlugins));
    $pluginsString = Zend_Json::encode($extraPlugins);
    $pluginsString = str_replace('"', "'", $pluginsString);
    $this->assertContains('extraPlugins="' . $pluginsString . '"', $html);
}

i hope it helps.

Posted by Matthew Weier O'Phinney (matthew) on 2011-07-05T15:34:07.000+0000

Unit test patch applied and view helper patched in trunk and 1.11 release branch.

Posted by Robert Basic (robertbasic) on 2011-08-01T14:04:21.000+0000

Pull request for porting the patch in ZF2 is sent: https://github.com/zendframework/zf2/pull/309

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts