This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dojo.declare("app.errorTooltip", dijit.Tooltip, { | |
| show: function() { | |
| var elem = dojo.byId(this.connectId[0]); | |
| if(dojo.isIE) { | |
| elem.fireEvent('onfocus'); | |
| } else { | |
| var e = document.createEvent("HTMLEvents"); | |
| e.initEvent('focus', false, true); | |
| elem.dispatchEvent(e); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var errors = dojo.query("form ul.errors").forEach(function(node, idx, nodes){ | |
| var id = node.parentNode.firstChild.getAttribute('for'); | |
| var label = "<ul class='errors'>" + node.innerHTML + "</ul>"; | |
| var tooltip = app.errorTooltip({ | |
| label: label, | |
| connectId: [id] | |
| }); | |
| document.body.appendChild(tooltip.domNode); | |
| tooltip.show(); | |
| // these next 2 lines are for marking the connected fields as invalid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Zend\Controller\Action, | |
| Zend\View\Variables; | |
| use App\Model; | |
| class IndexController extends Action | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // telling ZF where an action helper is | |
| class Bootstrap extends Application\Bootstrap { | |
| public function _initActionHelpers() | |
| { | |
| Zend\Loader\PluginClassLoader::addStaticMap(array('loggedinuser' => 'Planet\Controller\Helper\LoggedInUser')); | |
| } | |
| // registering FC plugins can be done like this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Bootstrap extends Application\Bootstrap { | |
| /** | |
| * Initializing action helpers | |
| */ | |
| public function _initActionHelpers() | |
| { | |
| // instead of this... | |
| // Zend\Loader\PluginClassLoader::addStaticMap(array('loggedinuser' => 'Planet\Controller\Helper\LoggedInUser')); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // as in ZF2 there's no more automagical calling of view helpers | |
| // things are a changed a bit... | |
| $view->broker('helper', array(/*options to pass to the helper*/)); | |
| // or | |
| $view->broker('helper')->direct(array(/*options to pass to the helper*/)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Bootstrap { | |
| public function _initActionHelpers() | |
| { | |
| $this->bootstrap('FrontController'); | |
| $fc = $this->getResource('FrontController'); | |
| $fc->getHelperBroker() | |
| ->setClassLoader(new \Zend\Loader\PrefixPathLoader( | |
| array( | |
| array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class ContactTest extends \PHPUnit_Framework_TestCase | |
| { | |
| public function setUp() | |
| { | |
| $ext = new CoreExtension(); | |
| $message = new Message(); | |
| $factory = new FormFactory(array( | |
| $ext |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ===================================================================== | |
| TEST RESULT SUMMARY | |
| --------------------------------------------------------------------- | |
| Exts skipped : 51 | |
| Exts tested : 26 | |
| --------------------------------------------------------------------- | |
| Number of tests : 11999 8158 | |
| Tests skipped : 3841 ( 32.0%) -------- | |
| Tests warned : 0 ( 0.0%) ( 0.0%) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (debug) | |
| (if | |
| (is (application_name) "Firefox") | |
| (begin | |
| (set_workspace 1) | |
| (maximize) | |
| ) | |
| ) |